laravel-filters

Laravel auth filter fails on production server

喜欢而已 提交于 2019-12-12 03:25:36
问题 I'm using Laravel 4 framework with standard built-in Auth support. In local environment everything works nice (MAMP, OSx), but on my production server (Digital Ocean standard image with Ubuntu, Apache, Php 5.5.9) auth filter fails and allows access without authentication. routes.php: Route::group(['before'=>'auth'], function(){ Route::get('admin', array('uses' => 'AdminController@home')); Route::get('admin/dashboard', function(){ return Redirect::to('admin'); }); Route::post('payment/ok',

Filters in Laravel 5

ε祈祈猫儿з 提交于 2019-12-03 03:27:58
问题 How do we make filters in Laravel 5? Is the idea of filters going away? 回答1: The short answer is no, route filters are not going away entirely in Laravel 5.0 (despite some misleading information out there about this). The functionality still exists to let you use 'before' and 'after' filters on your routes if you would like. The "filters.php" file is no longer provided, but you can still define your filters somewhere else, probably most appropriately in the boot() function of Providers

Filters in Laravel 5

旧城冷巷雨未停 提交于 2019-12-02 16:59:55
How do we make filters in Laravel 5? Is the idea of filters going away? The short answer is no, route filters are not going away entirely in Laravel 5.0 (despite some misleading information out there about this). The functionality still exists to let you use 'before' and 'after' filters on your routes if you would like. The "filters.php" file is no longer provided, but you can still define your filters somewhere else, probably most appropriately in the boot() function of Providers/RouteServiceProvider.php. However , middleware is now the preferred way to achieve the same functionality. See