"ページが見つかりません"または何かメッセージを出す方法を教えてもらえますか?たとえば、私のプロジェクトに存在しない標準エラーページ(Woops、何かが間違っていて、[bla.bla]が見つかりませんでした)が表示されず、私の指定したページを表示しないブラウザにリンクを書きます。エラーメッセージ - Laravel 5.2
<?php
Route::get('sendemail', '[email protected]');
Route::get('test', '[email protected]');
Route::get('napravisiadmin', '[email protected]');
Route::group(['middleware' => ['web']], function() {
Route::group(['middleware' => ['guest']
], function() {
Route::get('login', '[email protected]');
Route::post('login', '[email protected]');
});
Route::get('logout', '[email protected]');
//Admin
Route::group(['middleware' => ['auth', 'auth.admin']
], function() {
Route::group([
'prefix' => 'admin',
'namespace' => 'Admin'
], function() {
Route::controller('student', 'StudentsController');
Route::controller('profile', 'ProfilesController');
Route::controller('class', 'ClassesController');
Route::controller('subjects', 'SubjectsController');
Route::controller('teacher', 'TeachersController');
Route::controller('marktype', 'MarkTypeController');
Route::controller('rules', 'RuleController');
Route::get('{slug?}', '[email protected]');
});
});
//Admin
//Student
Route::group([
'middleware' => ['auth', 'auth.student'],
'prefix' => 'stu',
'namespace' => 'Stu'
], function() {
Route::get('{slug?}', '[email protected]');
});
//Student
//Teacher
Route::group([
'middleware' => ['auth', 'auth.teacher'],
'prefix' => 'educator',
'namespace' => 'Educator'
], function() {
Route::get('edit/{id}', '[email protected]');
Route::post('edit/{id}', '[email protected]');
Route::get('account', '[email protected]');
Route::get('class-subject', '[email protected]');
Route::get('add-mark', '[email protected]');
Route::post('mark', '[email protected]');
Route::get('added', '[email protected]');
Route::get('statistics', '[email protected]');
Route::get('personalemails', '[email protected]');
Route::post('personalemails', '[email protected]');
});
//Teacher
});
Route::get('{slug?}', '[email protected]');
エラーを処理する方法の詳細については[こちら](http://stackoverflow.com/questions/34250180/laravel-5-how-to-handle-error-messages/34250468#34250468)をご覧ください – Moppo