Add fallback routes to web and api

This commit is contained in:
DariusIII
2018-10-30 13:03:55 +01:00
parent 004137d473
commit e71e9bc8b3
4 changed files with 16 additions and 0 deletions
+1
View File
@@ -1,4 +1,5 @@
2018-10-30 DariusIII
* Chg: Add fallback routes to web and api
* Chg: Update messages output in ProcessReleases
* Chg: Update ColorCLI output, remove added newline string (\n)
* Chg: Update phpunit/php-token-stream to version 3.0.1
+7
View File
@@ -0,0 +1,7 @@
@extends ('errors.layout')
@section ('content')
<h3>Sorry {{ auth()->user()->username }} ! This page doesn't exist.</h3>
<br>
<h4>Browse back and try again.</h4>
@stop
+4
View File
@@ -34,3 +34,7 @@ Route::group(['prefix' => 'v2', 'namespace' => 'Api', 'middleware' => ['auth:api
Route::get('details', 'ApiV2Controller@details');
Route::post('details', 'ApiV2Controller@details');
});
Route::fallback(function(){
return response()->json(['message' => 'Not Found!'], 404);
});
+4
View File
@@ -347,3 +347,7 @@ Route::group(['middleware' => ['role_or_permission:Admin|Moderator|edit release'
Route::get('release-edit', 'ReleasesController@edit');
Route::post('release-edit', 'ReleasesController@edit');
});
Route::fallback(function(){
return response()->view('notFound', [], 404);
});