I am troubling a bit with loading/including files from outside of the laravel installation, I know how to load a view from a directory other than laravel's default like,
View::addNamespace('theme', '/path/to/themes/views');
return View::make('theme::view.name');
but this is the case to load/include view from outside of the laravel installation. I have a file structure like this,
/home
/laravel-app/resources/views/app.blade.php
/outside-laravel/subdomain/header.blade.php
/footer.blade.php
All I want is to include header.blade.php and footer.blade.php file in app.blade.php This is what I want to achieve in other words in app.blade.php
@include("/home/outside-laravel/subdomain/header")
<div class="container">
@yield('content')
</div>
@include("/home/outside-laravel/subdomain/footer")
Is this really possible?
Any solution other than hardcoding the path using php's inlude/require ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire