Support the ongoing development of Laravel.io →
Installation Configuration Requests
Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

abernabe abernabe Joined 16 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.