I have never seen the " 'do' -> function() { "in a route before.
Maybe try without,
Route::get('test_server2', array('before' => 'test_filter', function() {
return 'After filter';
}));
There are no special configs needed to use filters on either server, it should work on both in the same way.
The "do" thing is OK. I saw it somewhere and it's an alternative way to specify it.
I've tried removing it as you suggested but it didn't work. I prepared this route to show a very simple example that isn't working on a server. I have a large application with many different routes and filters that never get applied, so I tried to simplify as much as possible.
Does anyone know why the filters may not get executed?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community