user3809590
user3809590

Reputation: 175

Laravel route doesn't work

I am making basic route with controller but it doesnt work, I dont know why... Earyer worked for me but now doesnt...

Here is routes.php:

Route::get('/admin', array(
   'as' => 'admin-login',
   'uses' => 'AdminController@getAdminLogin'
));

Here is AdminController.php:

class AdminController extends BaseController {

  public function getAdminLogin()
  {
    return View::make('admin.index');
  }
}

When I type localhost/project/public/admin... It goes to localhost/admin Why?

Upvotes: 0

Views: 1053

Answers (1)

Mustafa Ehsan Alokozay
Mustafa Ehsan Alokozay

Reputation: 5823

Why don't you use Laravel's own Web Server:

php artisan serve

And then, try this:

http://localhost:8000/admin/

Upvotes: 3

Related Questions