Route::any('user/(:all)', 'UserController@(:1)');
Route::filter('old', function()
{
if (Input::get('age') < 200)
{
return Redirect::to('home');
}
});
Route::get('user/{id}', 'UserController@showProfile');
SELECT id, caption, SUM(ordercount) ordercount, SUM(billcount) billcount, SUM(billsum) billsum, SUM(offercount) offercount, SUM(offersum) offersum
FROM (
SELECT c.id, c.caption, ordercount, billcount, billsum, 0, 0 FROM
-- здесь запрос по счетам
UNION ALL
SELECT c.id, c.caption, 0, 0, 0, offercount, offersum FROM
-- здесь запрос по предложениям
) a
GROUP BY id, caption