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

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.
0

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

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

Sign in to participate in this thread!

Eventy

Your banner here too?

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.