Skip to content

Commit

Permalink
adding log to error page
Browse files Browse the repository at this point in the history
  • Loading branch information
2amjsouza committed Dec 8, 2023
1 parent 0864dd8 commit fed1841
Show file tree
Hide file tree
Showing 11 changed files with 623 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/_laravel/resources/views/errors/401.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Unauthorized'))
@section('code', '401')
@section('message', __('Unauthorized'))
5 changes: 5 additions & 0 deletions tests/_laravel/resources/views/errors/403.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Forbidden'))
@section('code', '403')
@section('message', __($exception->getMessage() ?: 'Forbidden'))
5 changes: 5 additions & 0 deletions tests/_laravel/resources/views/errors/404.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Not Found'))
@section('code', '404')
@section('message', __('Not Found'))
5 changes: 5 additions & 0 deletions tests/_laravel/resources/views/errors/419.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Page Expired'))
@section('code', '419')
@section('message', __('Page Expired'))
5 changes: 5 additions & 0 deletions tests/_laravel/resources/views/errors/429.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Too Many Requests'))
@section('code', '429')
@section('message', __('Too Many Requests'))
10 changes: 10 additions & 0 deletions tests/_laravel/resources/views/errors/500.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@extends('errors::minimal')
@php
$log = storage_path() . '/logs/laravel.log';
if (file_exists($log)) {
echo file_get_contents($log);
}
@endphp
@section('title', __('Server Error'))
@section('code', '500')
@section('message', __('Server Error'))
5 changes: 5 additions & 0 deletions tests/_laravel/resources/views/errors/503.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Service Unavailable'))
@section('code', '503')
@section('message', __('Service Unavailable'))
Loading

0 comments on commit fed1841

Please sign in to comment.