JesseObrien/laravel-cheatsheet

Route::get() arguments order

wariotx opened this issue · 0 comments

If passing an array of options, the callback needs to be the first item.
Example:
Should be

Route::get('/',
    array(
        function(){},
        'before'=>'cache'
    )
);

And not

Route::get('/',
    array(
        'before'=>'cache',
        function(){}
    )
);