I have just integrated my angular 6 project into laravel 5.4.
I followed the normal Laravel templating and here i put my angular index.html
code inside welcome.blade.php and it worked fine. I also put the assets in the public folder. I then deployed the entire thing on a shared server.
The problem am having is that after deployment, i cannot refresh or move back to the previous page. I cannot even navigate manually to a url directly in the browser. I need a way to make laravel always load welcome.blade.php everytime i serve a request.
Thank you for any help.
this is my web.php
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
then api.php
<?php
Route::group([
'middleware' => 'api'
], function () {
Route::post('login', 'AuthController@login');
Route::post('signup', 'AuthController@signup');
Route::post('logout', 'AuthController@logout');
Route::post('refresh', 'AuthController@refresh');
Route::post('me', 'AuthController@me');
});
That's where a directing routes from .
And my welcome.blade.php contains the angular index.html code