i have some small problem, but i cannot find it out. I have removed from the routes.php the middleweare routes for my admin section. I want this check to be made in one Controller class, which will be extended from all my Admin Controllers.
This is this controller class:
abstract class Controller extends BaseController {
public function __constuct() {
$this->middleware('admin');
}
}
Here is one of my Admin Controllers:
class AnalysesController extends Controller {
protected $news;
protected $locales;
const ITEMS_PER_PAGE = 20;
public function __construct(Analyses $news) {
$this->news = $news;
$this->locales = get_locales();
parent::__construct();
}
}
Unfortunately when i call parent::__construct() i get an error: Cannot call constructor
What am i doing wrong ?
You have a typo in __constuct?