「laravel5でカスタム404エラーページ」の編集履歴(バックアップ)一覧はこちら

laravel5でカスタム404エラーページ」(2016/06/14 (火) 19:40:05) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

Laravel5で404エラーページを表示させたい。 apacheの標準ではURLが存在しなかった場合not foundを表示させている。 Not Found The requested URL /hoge was not found on this server. Apache/2.2.15 (CentOS) Server at ドメイン名 Port 80 このようではなく、カスタムページを表示させたいという内容。 ~ ~ *resorce/views/errors/の中に404.blade.phpというファイルを作る resource/views/errors/404.blade.php ファイルの中身(同ディレクトリにある503.blade.phpの内容を変えたものです。) <!DOCTYPE html> <html> <head> <title>Be right back.</title> <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> <style> html, body { height: 100%; } body { margin: 0; padding: 0; width: 100%; color: #B0BEC5; display: table; font-weight: 100; font-family: 'Lato'; } .container { text-align: center; display: table-cell; vertical-align: middle; } .content { text-align: center; display: inline-block; } .title { font-size: 72px; margin-bottom: 40px; } </style> </head> <body> <div class="container"> <div class="content"> <div class="title">許可さていないアクションです。または違いますよ!</div> </div> </div> </body> </html> ~ ~
Laravel5で404エラーページを表示させたい。 apacheの標準ではURLが存在しなかった場合not foundを表示させている。 Not Found The requested URL /hoge was not found on this server. Apache/2.2.15 (CentOS) Server at ドメイン名 Port 80 このようではなく、カスタムページを表示させたいという内容。 ~ ~ *resorce/views/errors/の中に404.blade.phpというファイルを作る resource/views/errors/404.blade.php ファイルの中身(同ディレクトリにある503.blade.phpの内容を変えたものです。) <!DOCTYPE html> <html> <head> <title>エラー</title> <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"> <style> html, body { height: 100%; } body { margin: 0; padding: 0; width: 100%; color: #B0BEC5; display: table; font-weight: 100; font-family: 'Lato'; } .container { text-align: center; display: table-cell; vertical-align: middle; } .content { text-align: center; display: inline-block; } .title { font-size: 72px; margin-bottom: 40px; } </style> </head> <body> <div class="container"> <div class="content"> <div class="title">許可さていないアクションです。または違いますよ!</div> </div> </div> </body> </html> ~ ~

表示オプション

横に並べて表示:
変化行の前後のみ表示: