I'm trying to call Session::get() in the file database.php in Laravel 5.2 but I get an exception that says: Session class not found, which was not the case in Laravel 4. I tried use Session but the bug always remains. I also tried use Illuminate\Support\Facades\Session and use Illuminate\Support\Facades\Session::class but still the same.
I thought of another alternative solution: using the default $_SESSION variable of PHP after calling, of course, session_start() in top of the file database.php and it worked. So my question is: won't this quick fix interfere with Laravel's core session handler? if yes, how can I call Session class from database.php
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire