I have a Laravel 5.8 project and I'm using Blade to display the website.
However, I have .blade
files outside of the Laravel project, that I'd like to @include()
or display from the controller with return view();
with blade.
Here is a similar folder structure:
/var/www/examplesite1/
/var/www/examplesite2/
/var/www/laravel/
/var/www/storage/blade/
So for example the Laravel application is on the /var/www/laravel/
path. The blade file I'd like to get is from this path /var/www/storage/blade/
.
What I tried was:
return view('/var/www/storage/blade/file.blade.php');
include('/var/www/storage/blade/file.blade.php');
None of them worked, becauase I got an error like this: View [.var.www.storage.blade.file.blade.php] not found.
I also tried it with omitting the 'blade.php' from the end, but it's the same.
Is it possible to include a blade file from outside the Laravel project? If yes, how?
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Y7gTvA
via IFTTT
Aucun commentaire:
Enregistrer un commentaire