I am using Laravel 5.0 and I am trying to create a view if is does not exits like so
if (view()->exists($moduleName.$getCategoryNameToLowerCase))
{
//if exist return the view
return view($moduleName.$getCategoryNameToLowerCase);
}
else{
//else create a view and return it;
fopen( app_path('../resources/','views/'.$moduleName .'.'. $getCategoryNameToLowerCase . '.blade.php' ), 'w');
return view($moduleName.$getCategoryNameToLowerCase);
}
But I dont know why I am still not able to go one folder backwards to reach the resource folder it still says this
fopen(C:\xampp\htdocs\foobar\app/../resources/): failed to open stream: No such file or directory
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire