Commit b5fbd8dc authored by Victor Friboulet's avatar Victor Friboulet
Browse files

Merge remote-tracking branch 'origin/exception-handler'

parent 85452e31
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace App\Exceptions;

use Illuminate\Database\QueryException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
@@ -37,6 +38,10 @@ class Handler extends ExceptionHandler
     */
    public function register()
    {
        $this->renderable(function(QueryException $queryException, Request $request){
            if ($queryException->getCode()==45000)
            return response()->view('erreur-page',['message'=>$queryException->getMessage()]);
        });
        $this->reportable(function (Throwable $e) {
            //
        });

public/css/error.css

0 → 100644
+54 −0
Original line number Diff line number Diff line
html{
    background-image: url("/images/error.jpg");
    background-repeat: no-repeat;
    background-size: cover;
}

.center-box{
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.22);
    width: 60vw;
    height: auto;
    border-radius: 30px;
    margin: auto;
    margin-top: 7em ;
    display: block;
    text-align: center;
    backdrop-filter: blur(5px);
}

h1{
    font-family: 'Space Grotesk', sans-serif;
    font-size: 55px;
    color: white;
    font-weight: bold;
}

p{
    font-family: 'Montserrat', sans-serif;
    margin-top: 30px;
    font-size: 30px;
    color: white;
}

@media only screen and (max-width: 768px) {
    /* For mobile phones: */

    .center-box{
        padding: 30px;
        background-color: rgba(255, 255, 255, 0.22);
        width: 75vw;
        height: auto;
        border-radius: 30px;
        margin: auto;
        margin-top: 7em ;
        display: block;
        text-align: center;
        backdrop-filter: blur(5px);
    }

    h1{
        font-size: 50px;
    }

  }
 No newline at end of file
+0 −4
Original line number Diff line number Diff line
@@ -6,10 +6,6 @@ html{
    background-image: url("/images/background-homepage.jpg");
}

.background-image{
    filter: blur(5px);
}

.center-box{
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.22);
+186 KiB
Loading image diff...
+11 −0
Original line number Diff line number Diff line
<x-layout>
    <link rel="stylesheet" href="/css/error.css">

    <div class="center-box">
        <h1>OUPS! UNE ERREUR EST SURVENUE</h1>
        <p>
            {{$message}}
        </p>
    </div>

</x-layout>
 No newline at end of file
Loading