Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はLaravel(バージョン3)を初めて使用します.Laravelでルートとフィルターを設定して、URLにアクセスしようとしている権限のないユーザーがログインページにリダイレクトされるようにする方法がわかりません(404エラーではありません)。無許可ユーザーのデフォルトのホームページはログイン ページになり、許可ユーザーの場合はダッシュボードになります。
このようにルートの宣言に before フィルターを入れるだけです
Route::get('edit_profile', array('before' => 'auth', function() { return View::make('profile.edit'); }));
Laravel には Auth フィルターがデフォルトで存在します。