Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

Thanks, that's exactly what I was looking for!

Last updated 2 years ago.
0

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

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ammonkc ammonkc Joined 31 Jan 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.