0
Stack에서 검색 한 결과 How to add filter parameters to controllers in Laravel?이 표시됩니다. 제가 비슷한 질문하지만,이 시간이매개 변수가 구성된 Laravel 필터
, 나는이 유연한 $의하여 myParam 인수를 전달해야, 코드를 넣고 다음과 같습니다
Route.php
Route::filter('diffauthor',function($myparam){
if(Authority::cannot('edit', 'postedit', $myparam))
return View::make('permdeny.index');
});
에서와 컨트롤러에서 :
public function __construct() {
parent::__construct();
$this->filter('before','diffauthor', $myparam);
}
사용자 요청에 $ myparam base를 전달하려면 어떻게해야합니까?