diff --git a/routes/web.php b/routes/web.php index 2656043c..fec3f552 100644 --- a/routes/web.php +++ b/routes/web.php @@ -252,10 +252,10 @@ Route::get('/transactions/supplier/{id}/mock_up', 'Transactions\DownloadMockUpWh Route::get('/notifications/list', 'Notifications\ListNotificationsController@list')->name('notifications.list'); -Route::get('/supplier/pi/export/{month}/{year}/{?id}', function($month, $year, $id){ +Route::get('/supplier/pi/export/{month}/{year}/{id?}', function($month, $year, $id = null){ if(!$id){ - foreach (Company::where('business_type', \App\Classes\ValueObjects\Constants\BusinessType::CURRENCY_VENDOR) as $supplier) { + foreach (Company::where('business_type', \App\Classes\ValueObjects\Constants\BusinessType::CURRENCY_VENDOR)->get() as $supplier) { echo '

'.$supplier->name.'

'; }