Add (favicon)
Update (route): Fix missing regex combo
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
use Illuminate\Auth\AuthenticationException;
|
use Illuminate\Auth\AuthenticationException;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
@@ -32,17 +33,13 @@ public function register()
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->renderable(function (NotFoundHttpException $e, $request) {
|
$this->renderable(function (NotFoundHttpException $e, $request) {
|
||||||
|
if ($request->is('api/*')) {
|
||||||
|
return response()->json([
|
||||||
if ($request->is('api/*')) {
|
'status' => -1
|
||||||
return response()->json([
|
], 404);
|
||||||
'status' => -1,
|
}
|
||||||
], 404);
|
});
|
||||||
} else {
|
|
||||||
return redirect()->route('front.home');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -27,4 +27,6 @@
|
|||||||
|
|
||||||
Route::get('/news/{slug}', [App\Http\Controllers\Front\FrontPostController::class, 'index'])->name('front.post');
|
Route::get('/news/{slug}', [App\Http\Controllers\Front\FrontPostController::class, 'index'])->name('front.post');
|
||||||
|
|
||||||
Route::get('/{category_slug}', [App\Http\Controllers\Front\FrontListController::class, 'category'])->name('front.category');
|
Route::get('/{category_slug}', [App\Http\Controllers\Front\FrontListController::class, 'category'])
|
||||||
|
->where('category_slug', '^(automotive|business|trading|information-technology|marketing|office|telecommunications|food-drink|collectibles|pets|photography|hobbies-gifts|hunting-fishing|law|politics|home-garden|shopping|fashion-clothing|real-estate|family|wedding|immigration|society|education|languages|health|beauty|psychology|wellness|religion-spirituality|tips-tricks|how-to|holiday|world-festivals|travel|outdoors|computer|phones|gadgets|technology|social-networks)$')
|
||||||
|
->name('front.category');
|
||||||
|
|||||||
Reference in New Issue
Block a user