1 year ago

Custom Error Page (not Custom HTTP Error Page)

Posted 1 year ago by raphael

[Laravel 5.5]

I would like to show a custom error page that has the same look as Laravel's HTTP errors (404, 500 etc.).


$user = User::whereChangeEmailToken($token)->first();
if (! $user) {
    return view('errors.token');

Blade Template:

@section('title', 'Unknown Token')
    Unknown Token
    <small>This link is invalid because we do not know this token.</small>

As you see, the blade template extends the errors layout in the same way as the http errors.

However, it gives me this error:

No hint path defined for [errors]. (View: /home/vagrant/code/project/resources/views/errors/token.blade.php)

My custom HTTP error pages in the same directory do work, though.

What am I doing wrong?

Please sign in or create an account to participate in this conversation.