⛸️

Database Connection

to connect database you have to open the .env file and there you need to change the database name , username and password .
If you are working with another db other than mysql then you can change the DB_CONNECTION to that name ( ex. postgressql)
 
To check the connection you can create a controller and configure that to a view .
After that you have to import the DB class and simply use that
use Illuminate\Support\Facades\DB; function index(){ return DB::select("select * from users"); } // this will return data in json so you can make use of this in apis