From 7d0b3adbf8df5e13c06d96837c46a5772bd0fdbf Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Fri, 24 Feb 2023 17:31:27 +0800 Subject: [PATCH] add customisation for suppliers pi export --- routes/web.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.'

'; }