Route::get('/{any}', 'SinglePageController@index')->where('any', '.*'); // Route::get('/', function () { // return view('index'); // }); public function index() { return view('layouts.frontend'); }
Now front end is layout blade file where we are getting data using router-view the component will display content using router-view and will work just fine.