Skip to content

Error pages

Customize 404 page

Default 404 page for theme is located in /platform/themes/your-theme/views/404.blade.php. To customize error layout, you need to change in /platform/themes/your-theme/views/error-master.blade.php


Please use below code if you want to use theme layout for error pages.

<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link rel="canonical" href="{{ route('public.single') }}">
    <meta http-equiv="content-language" content="en">

        Theme::fire('beforeRenderTheme', app(\Botble\Theme\Contracts\Theme::class));
    {!! Theme::header() !!}
    {!! Theme::partial('header') !!}

    <div class="container">

    {!! Theme::partial('footer') !!}
    {!! Theme::footer() !!}

Example for /platform/themes/your-theme/views/404.blade.php:

@extends('theme.' . setting('theme') . '::views.error-master')

    SeoHelper::setTitle(__('Page could not be found'));

    <h1>{{ __('Page could not be found') }}</h1>
    <h4>{{ __('This may have occurred because of several reasons') }}:</h4>
        <li>{{ __('The page you requested does not exist.') }}</li>
        <li>{{ __('The link you clicked is no longer.') }}</li>
        <li>{{ __('The page may have moved to a new location.') }}</li>
        <li>{{ __('An error may have occurred.') }}</li>
        <li>{{ __('You are not authorized to view the requested resource.') }}</li>