Custom 404 page for laravel.
This commit is contained in:
parent
2d9ba720fd
commit
8c9337c63a
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Exceptions;
|
namespace App\Exceptions;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
|
|
@ -28,14 +29,14 @@ class Handler extends ExceptionHandler
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the exception handling callbacks for the application.
|
* Register the exception handling callbacks for the application.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
$this->reportable(function (Throwable $e) {
|
$this->renderable(function (NotFoundHttpException $e, $request) {
|
||||||
//
|
return response()->view('main', [], 404);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -33,10 +33,10 @@ const Navbar = (props) => {
|
||||||
<NavLink className="navbar-brand" to="/">
|
<NavLink className="navbar-brand" to="/">
|
||||||
<img src="/images/logo.png" alt="Graphictoria" width="43" height="43" draggable="false"/>
|
<img src="/images/logo.png" alt="Graphictoria" width="43" height="43" draggable="false"/>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
<button className="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#graphictoria-nav" aria-controls="graphictoria-nav" aria-expanded="false" aria-label="Toggle navigation">
|
<button className="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#graphictoria-nav" aria-controls="graphictoria-nav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span className="navbar-toggler-icon"></span>
|
<span className="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
<div className="collapse navbar-collapse">
|
<div className="collapse navbar-collapse" id="graphictoria-nav">
|
||||||
<ul className="navbar-nav me-auto">
|
<ul className="navbar-nav me-auto">
|
||||||
{
|
{
|
||||||
!props.maintenanceEnabled ?
|
!props.maintenanceEnabled ?
|
||||||
|
|
@ -100,19 +100,6 @@ const Navbar = (props) => {
|
||||||
</nav>
|
</nav>
|
||||||
<div className="graphictoria-nav-margin">
|
<div className="graphictoria-nav-margin">
|
||||||
</div>
|
</div>
|
||||||
<div className="offcanvas offcanvas-end" tabIndex="-1" id="graphictoria-nav" aria-labelledby="graphictoria-nav">
|
|
||||||
<div className="offcanvas-header d-flex">
|
|
||||||
<div className="d-flex me-auto">
|
|
||||||
<a className="btn btn-success btn-sm" href="/login">Login</a>
|
|
||||||
<p className="text-muted my-auto mx-1">OR</p>
|
|
||||||
<a className="btn btn-primary btn-sm" href="/register">Sign up</a>
|
|
||||||
</div>
|
|
||||||
<button type="button" className="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div className="offcanvas-body">
|
|
||||||
egg
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,31 @@ use Illuminate\Support\Facades\Route;
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
return view('main');
|
return view('main');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::get('/login', function () {
|
||||||
|
return view('main');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('/register', function () {
|
||||||
|
return view('main');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('/passwordreset', function () {
|
||||||
|
return view('main');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('/legal/about-us', function () {
|
||||||
|
return view('main');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('/legal/terms-of-service', function () {
|
||||||
|
return view('main');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('/legal/privacy-policy', function () {
|
||||||
|
return view('main');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('/legal/dmca', function () {
|
||||||
|
return view('main');
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue