Skip to content
Advertisement

Changing navigation and link URLs?

I am new to laravel and this will be inappropriate question. Although I searched I couldn’t find the answer. My project run smoothly with php artisan serve command. I just wanted to remove the artisan command. So I added my project into htdoc folder of XAMPP. Then I changed according to this answer

https://stackoverflow.com/a/28799205/3558507

When I run my project by typing URL on chrome as “http://localhost/MonitorEnto/public/home” home page is appearing. But when I tried to navigate through links and tabs its not working, URL is showing in my browser as “http://localhost/add_company“.

I changed config/app.php line as 'url' => env('APP_URL', 'http://localhost/MonitorEnto/public/'), But still problem is there. Please help me to solve this matter. Thanks/

Advertisement

Answer

You have to change navigation menu as you declared in route. Check you route file and add proper route name in respective menu. Hope this will solve your issue. And you should link up style/scripts file properly.

Suppose for home:

Route::get('/home', 'HomeController@index')->name('home');

You can call in blade file {{ route('home') }} or defined url as {{ url('/home') }}.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement