Andrew T Andrew T - 1 year ago 105
PHP Question

laravel route fix needed

I have a laravel project which I run from my local apache server directory.
The link for accessing this project is


And I have a navigation menu

navigation menu

After I have set the APP_URL in .env file to


I get no problems while navigating through the About and Contact pages in the project but when I access the Home page the browser goes to the


but not to the


How can I fix it? Here are my routes:

Route::get('/', 'PagesController@getIndex');
Route::get('about', 'PagesController@getAbout');
Route::get('contact', 'PagesController@getContact');

Answer Source

I think the best way is to setup a vhost in apache. if you want to work like this in your .env set the APP_URL= http://localhost/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download