You should use:
View::addNamespace("backend", "path/to/backend");
View::addNamespace("frontend", "path/to/frontend")
You can put this on a service provider or in start.php file.
Then you can access to the proper view using:
return View::make("backend::auth.login"); //return path/to/backend/auth/login.blade.php
You should have the same problem with configuration, but you can resolve using
Config::addNamespace(); //works like View::addNamespace
Take a look at http://laravel.com/docs/packages
Thanks, that's exactly what I was looking for!
It works, but layouts doesnot
For example:
protected $layout = 'layouts.master';
/**
* Show the user profile.
*/
public function showProfile()
{
$this->layout->content = View::make('user.profile');
}
protected $layout = 'layouts.master' searchs in app/views/layouts -directory instead of Acme/admin/views/layouts
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community