There you go: http://laravel.com/docs/master/upgrade#upgrade-5.0
[L5] Porting L4 Controllers and Namespaces
I hope this is to do with my lack of understanding of L5 controller namespaces:
I have an existing L4 app and would like to bring it into L5
my app is entirely within its own folder so:
app/Myapp
app/Myapp/Widgets
app/Myapp/Controllers
etc
its namespaced and works ok in L4
I've set psr4 autoload in composer.json
I'm looking to use BootstrapCMS as a basis and I'll use it as an example altho it may not be relevant to the more generic question
in Http/Providers/RouteServiceProvider Graham Campbell sets a namespace so:
class RouteServiceProvider extends ServiceProvider
{
/** ...
*/
protected $namespace = 'GrahamCampbell\BootstrapCMS\Http\Controllers';
I now set a basic route in Http/routes.php like this:
Route::get('/', ['uses' => 'Myapp\Controllers\WidgetController@index']);
when I access that route I get this ReflectionException:
Class GrahamCampbell\BootstrapCMS\Http\Controllers\Myapp\Controllers\WidgetController does not exist
I've read the L5 docs and matt stauffer's upgrade blog esp. controllers, namespaces and RouteServiceProvider But I dont see any override for location of Myapp controllers under these circumstances. In fact it seems I am now forced to place all my controllers under Http/Controllers.
Surely I am mistaken here? can somebody please show how
thanks
l. (no preview in here so apologies if my markdown is markwrong)
Please or to participate in this conversation.