php - Laravel filter not executed -
I have a very strange problem.
On my local machine (Windows 8, XAMPP) Laravel filter should work, but they do not do on the server. (Ubuntu with Apache).
Route: filter ('test_filter', function ($ request) {echo 'inside filter & lt; br / & gt;';}); Path: get ('test_server2', array ('first' = & gt; 'test_filter', function () 'return & gt;';}) after filter; When I run it on my local server, the output is:
inside the filter
after filter < P> When I run the same script from the Web, I get:
after the filter
As you can see, the filter Not being implemented, they are never executed. There is no random or temporary thing.
I saw this problem in a large application that I have.
Does anyone know why the filter can not be executed? / P>
I have checked the routing classes in Laravel's source code and I did not find anything that could help me solve my problem.
First: Always define which specific version of Laravel you use Are, and where everything is executed.
Some codes are executed only on production. If you have defined your code in app / start / artisan.fp
or app / start / local.php
, from product
we Can not help, if you do not specify exactly where your lines are defined.
Last but not least: Try to reduce the difference between your development environment and your production environment. I recommend using Vagrants and possibly Laurel Homestead. In this way, you can develop large applications on Windows and can run in virtual Ubuntu environment.
Hope this will be helpful.
Comments
Post a Comment