Support the ongoing development of Laravel.io →
posted 9 years ago
Requests
Last updated 2 years ago.
0

There is a difference between "AboutController@index" and "Controller@index" Make sure you have "AboutController.php" file available in App\Http\Controllers"

Since you are a newbie. Try to first learn about routes in laravel. Its a vast subject, but necessary to learn for use.

Routes : http://laravel.com/docs/5.0/routing Controllers : http://laravel.com/docs/5.0/controllers

0

I have controller called AboutController in App\Http\Controllers, with function index, I am trying to say that in Main Directory - "http://127.0.0.1" everything loads perfectrly but when try to access a sub directory "http://127.0.0.1/about"(and yes i have it registered in routes) i get 404 error

Last updated 9 years ago.
0

post your routes.php and AboutController.php

0

Make sure the AboutController class extends the Controller class

try changing

Route::get('/about', 'AboutController@index');

to

Route::get('about', 'AboutController@index');
0

you could also list routes (php artisan route:list) (or routes:list) - i always forget if its plural or singular. and see if you route is there.

you could also do php artisan route:cache & then route:clear (it worked for me as i had similar problem) (i say clear the cache otherwise you will have to keep on running cache command everytime you add a new route)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

megashot megashot Joined 6 Jun 2015

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.

© 2024 Laravel.io - All rights reserved.