1. Database Connection
2. Authentication
1. Database connection
Using DB class
import class
use Illuminate\Support\Facades\DB;
Access Database Name
-dump(\DB::connection()->getDatabaseName());
Access Database Connection Name through which the project is connected to the DB
-dump(DB::connection()->getName());
Access in blade file/view|
-{{\DB::getDatabaseName();}}
2. Authentication
Get Current Auth user details
import class
use Auth;
-dd(Auth::user)
Comments
Post a Comment