My routes:
Route::group(array("namespace" => "languages"),function(){
Route::resource("languagesService", "languageServiceController");
Route::resource("languages","languageController");
});
languageservicecontroller and languagecontroller are in subfolder languages.
During login attempt i saved username and password in
Session::put('username', $user['username']);
Session::put('password', $user['password']);
But when i try to retrieve from languageController
$username = Session::get('username');
$password = Session::get('password');
i am getting following error
"Class 'languages\Session' not found" .
You are trying to access the Session class from a namespace where the Session class does not exist.
Try the following:
\Session::get('password')
OR
Include Session class at the top of your file.
<?php namespace languages;
use Session;
class languageServiceController
{
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With