I'm facing issue of "Class hash does not exist". I know there are same question related this but these are not enough for me. Here I'm loading routes as per user device. As per mobile I using different routes as shown below:
Route::group(['middleware' => ['web']], function () {
if(SiteHelpers::isMobileViewEnabled() == true && Mobile::isMobile() == true && Mobile::isTablet() == false){
require app_path('Http/Routes/mui.php');
}else{
require app_path('Http/Routes/desktop.php');
}
...
Here is SiteHelper code
public static function isMobileViewEnabled()
{
$isEnabled = false;
$user = Auth::user();
$getEnabled = DB::table('setting')->where('setting_name', 'Mobile UI')->first();
if(isset($getEnabled) && $getEnabled->setting_value==1){
$isEnabled = true;
}
return $isEnabled;
}
When I use
Auth::user()
Than I'm getting error
I don't know whats going wrong, Please let me know where I making mistake.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Qle0Wc
via IFTTT
Aucun commentaire:
Enregistrer un commentaire