At the moment, in Laravel 4 Beta 1, can you "only"? use namespace.
An example here in your controller file: app / controllers / backend / UserController.php
<?php namespace Controllers\Backend; use Illuminate\Routing\Controllers\Controller; class UserController extends Controller {
So in the file: app / routes.php:
<?php Route::get('backend/login', 'Controllers\Backend\UserController@login');
I don't know if this is the best, but it works here. Edit and dump-autoload "composer.json" do not seem to work.
If someone can improve it, he will make my day! :)
Pierre broucz
source share