This is my first time asking questions in StackOverflow so sorry for the mistakes.
I have a problem with laravel routes.
<?php
use IlluminateSupportFacadesRoute;
//start :: login
Route::group(['namespace' => 'auth'], function () {
Route::get('/', 'AuthController@index')->name('index');
Route::get('/showResult', 'AuthController@Result')->name('Result');
Route::post('/showResultds', 'AuthController@showResult')->name('showResult');
Route::post('/dologin', 'AuthController@doLogin')->name('doLogin');
Route::get('/logout', 'AuthController@logout')->name('logout');
So these are my routes.
I have determined the app URL correctly in .env file.
My problem is that when my website is on the server (windows server) the route becomes the server’s local IP address and not my domain or public IP address.
When I click on my links it becomes 172.30.30.4/login for example. and not domainname.com/login
Thanks for your help
2
Answers
When changing anything in any of the config files or the .env you should always run
This will clear your current cache and cache your new settings
change the url in your config/app.php
and dont forget to run php artisan config:cache