From 9266e5c2074a8836ca1f1d9652d1a70593f503f6 Mon Sep 17 00:00:00 2001 From: FreeScout Date: Sat, 15 Jul 2023 23:02:56 -0700 Subject: [PATCH] Allow to show custom message on 403 error page --- resources/views/errors/403.blade.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php index b05e7b08..505dd35c 100644 --- a/resources/views/errors/403.blade.php +++ b/resources/views/errors/403.blade.php @@ -4,5 +4,11 @@ @section('message') {{ __('Access denied') }} + @php + $msg = $exception->getMessage(); + @endphp + @if ($msg && strstr($msg, '[display]')) +

{{ str_replace('[display]', '', $msg) }} + @endif

{{ __('Go to') }} {{ __('Homepage') }} @endsection \ No newline at end of file