I have some troubles with filters in my controller and there parameters. Maybe one of you can help me out. Thank you. I have a controller similar to this one:
class Test extends Base_Controller
{
public function __construct()
{
parent::__construct();
$this->filter('before', 'permission:destroy|auth')->only(array('show'));
}
public function action_show($id)
{
}
and I defined a filter like this:
Route::filter('permission', function($permission)
{
echo $permisson;
If I call now the controller, the $permission
value of my filter is the $id
which was passed through action_show($id)
method. But when I have a Controller Method without a paramter everything works fine. How can I always get the filter parameter instead of the method argument?
Thanks for your help!