Support the ongoing development of Laravel.io →
posted 10 years ago
Configuration

Hello, I'm completely new to Laravel and fairly new to MVC at all. So I've installed laravel and started to read and learn from some tutorials but I stuck on the beginning. So I have login controler

class Login extends BaseController
{
    public function action_index()
    {
        echo 'test';
    }
}

Then I've put in app/routes.php

Route::controller(Controller::detect());

When I load http://localhost/laravel/login I get the error from the title. The tutorial that I trying to follow

Last updated 3 years ago.
0

That tutorial is for Laravel 3 and probably you have installed Laravel 4. Enable debuging in app/config/app.php

'debug' => true
Last updated 3 years ago.
0

mejlo said:

That tutorial is for Laravel 3 and probably you have installed Laravel 4. Enable debuging in app/config/app.php

'debug' => true

Yes, I forgot to say that I use Laravel 4.2.8 .. So after I put debug to TRUE I get this error:

Call to undefined method Illuminate\Routing\Controller::detect()

So may be is better to find tutorials for version 4.x?

Last updated 3 years ago.
0

Yea you can better find tutorials for version 4.x since they changed a lot from 3 to 4!

Here is a good tutorial to start with: Laravel 4 Authentication

Last updated 3 years ago.
0

Yeah, I will start tuts for 4.x. Also I've read about this error Controller::detect() that this function has been removed in Laravel 4 because of inconsistent behavior with varying filesystems. Thank's for help!

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

vinsbg vinsbg Joined 26 Aug 2014

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.