0

I've upgraded from Laravel 4 to Laravel 4.1 in a new branch on my repo, following the steps in

https://github.com/laravel/laravel/blob/develop/upgrade.md

The only step I wasn't able to fully follow was point 11 - add use Illuminate\Routing\Controller in baseController. The instruction is to replace an existing use statement. However in my version 4.0.9, it wasn't there.

Anyway, I am encountering a routing error when trying to hit a grouped route.

Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException Controller method [audience/uk] not found.

I could hit the route without problems in the 4.0 branch.

I believe my upgrade went ok otherwise as I could correctly see the 4.1 changes in `artisan changes'

My route looks like this:

Route::group(array('prefix' => 'admin', 'before' => 'auth.basic'), function()
 {

    Route::get('upload/audience/uk',array('as' => 'get-upload-uk-audience', 'uses' => 'CSVController@getUKAudience'));

 });

Any ideas?

Thanks

2

2 Answers 2

2

I came across the same problem using Laravel 4.1 which I solved by adding the following line right at the very top of the BaseContoller.

use Illuminate\Routing\Controller;

I'm also using Codesleeve Asset Pipline and had to add the same line to the top of the AssetPipelineController to get that working too.

I did quite an extensive search on this topic and was surprised at the lack of information online.

Hope this helps

Sign up to request clarification or add additional context in comments.

Comments

0

I'm just going to avoid using Route::controller.

Ref: https://github.com/laravel/framework/pull/2850

Thanks @Anultro from the github irc channel

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.