I'm trying to set up PSR-4 within a new Laravel 4 application, but I'm getting some troubles achieving what I want when it comes to build controllers.
Here's what I have now :
namespace MyApp\Controllers\Domain;
class DomainController extends \BaseController {
public $layout = 'layouts.default';
public function home() {
$this->layout->content = \View::make('domain.home');
}
}
I'm not so fond of using \View
, \Config
, \Whatever
to use Laravel's classes. So I was wondering if I could put a use Illuminate\View;
to be able to use View::make
without putting a \
.
Unfortunately, while doing this, I'm getting the following error : Class 'Illuminate\View' not found
.
Could somebody help with this please ?