laravel - Custom Filter Class - more than one filter in class -


i've read number of tutorials on custom filters.

here how custom filter set up:

class mycustomfilter {    public function filter($route, $request) {    }    public function filter2($route, $request) {    } } 

in filters file have:

route::filter('my_filter', 'mycustomfilter'); 

is there way have more 1 filter in class? i've tried calling so:

route::filter('my_filter', 'mycustomfilter.filter2'); 

but no luck.

you should able achieve using class@method

route::filter('my_filter', 'mycustomfilter@filter'); route::filter('my_filter', 'mycustomfilter@filter2'); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -