Created new route for 404 page
This commit is contained in:
parent
9d65030779
commit
b5c762b528
|
|
@ -33,13 +33,18 @@ use Webkul\Core\Repositories\SliderRepository;
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
if (request()->route()->getName() != 'shop.home.index')
|
||||
abort(404);
|
||||
|
||||
$currentChannel = core()->getCurrentChannel();
|
||||
|
||||
$sliderData = $this->sliderRepository->findByField('channel_id', $currentChannel->id)->toArray();
|
||||
|
||||
return view($this->_config['view'], compact('sliderData'));
|
||||
}
|
||||
|
||||
/**
|
||||
* loads the home page for the storefront
|
||||
*/
|
||||
public function notFound()
|
||||
{
|
||||
abort(404);
|
||||
}
|
||||
}
|
||||
|
|
@ -275,7 +275,5 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
|
|||
});
|
||||
//customer routes end here
|
||||
|
||||
// Route::get('/{any?}', 'Webkul\Shop\Http\Controllers\HomeController@index');
|
||||
|
||||
Route::fallback('Webkul\Shop\Http\Controllers\HomeController@index');
|
||||
Route::fallback('Webkul\Shop\Http\Controllers\HomeController@notFound');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue