Support the ongoing development of →
Configuration IOC Architecture
Last updated 1 year ago.

Try removing the

use Controller;

statement on the top of the BaseController class and replace it with

use Illuminate\Routing\Controller;

It should look like this:

<?php namespace MyCompany\MyProject\Controllers;
// full file name: src/backend/MyCompany/MyProject/Controllers/BaseController.php

use Illuminate\Routing\Controller;
use View;
class BaseController extends Controller
	protected function setupLayout()
		if (!is_null($this->layout)) {
			$this->layout = View::make($this->layout);

Or just remove the use statement all together if the Controller class your extending is within that namespace.

Last updated 9 years ago.

The easiest way to solve this problem is to add the following to the aliases array in config/app.php:

'Controller' => 'Illuminate\Routing\Controller',

Sign in to participate in this thread!


Your banner here too?


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

Your logo here?

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

© 2024 - All rights reserved.