Support the ongoing development of Laravel.io →
Packages Architecture

Hi,

I'm working on a cms package but my routes.php can't find my controller...

My package is called Blackbird\Bluebird and in my app.php settings file dashboard_uri is equal to 'admin'.

If I replace the Route::controller to Route::resource it al works find in my public directory, if I then switch to public/admin I get this error: Class Blackbird\Bluebird\Controllers\DashboardController does not exist. Note that it if I use Route::controller I get the error on the public directory aswell.

I already run composer dump-autoload...

What are my options?

routes.php:

$dashboardUrl = Config::get('bluebird::app.dashboard_url');

Route::controller($dashboardUrl, 'Blackbird\Bluebird\Controllers\DashboardController');

DashboardController.php:

<?php namespace Blackbird\Bluebird\Controllers;

class DashboardController extends BaseController {

	public function getIndex()
	{
		return View::make('bluebird::dashboard'); // Opens View/Dashboard.blade.php
	}

	// Some more code...

}
Last updated 3 years ago.
0

I solved it!

Had to run

php artisan dump-autoload
Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

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.

© 2025 Laravel.io - All rights reserved.