Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel custom 404 blade

// Create a file in resources/views/errors/404.blade.php and add this code.
@extends('errors::minimal')

@section('title', __('Not Found'))
@section('code', '404')

@if($exception)
    @section('message', $exception->getMessage())
@else
    @section('message', __('Not Found'))
@endif
  
 abort(404, 'Whatever you were looking for, look somewhere else');
 
PREVIOUS NEXT
Tagged: #laravel #custom #blade
ADD COMMENT
Topic
Name
5+2 =