If you are using Laravel with Database you have to specify which database you want to connect (Live/Local). You can configure your database credentials in .env and database.php inside config folder.
Most preferred way is by using .env from the root directory/folder. Doing this it will be easier for deploying in multiple instances like UAT, PROD, etc.
Comming back to your questions:
- Does using online database with laravel need creating classes? I assume you refer to models.
The answer is Yes and No.
NO: If you want to use Laravel Query Builder.
YES: If you want to use Elloquent ORM.
I personally prefer using Elloquent ORM instead of writing lots of dirty join query and beyond. Once you get the hang of it, you will never step away from Elloquent ORM. It take a bit of time to learn but worth the time you will invest.
- What should I add to the env file? This from my env file:
I think you are good with your current .env
Good luck and happy learning.