fix code and add id for get

This commit is contained in:
2025-09-22 12:22:03 +03:30
parent 918ba2716c
commit 4864ade311
3 changed files with 3 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ use App\Models\Damage;
use App\Services\Cartables\Damage\DamageService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Excel;
use Maatwebsite\Excel\Facades\Excel;
use PhpOffice\PhpSpreadsheet\Exception;
use Symfony\Component\HttpFoundation\BinaryFileResponse;

View File

@@ -18,7 +18,7 @@ class DamageService
$request,
allowedFilters: ['*'],
allowedSortings: ['*'],
allowedSelects: ['title', 'unit', 'base_price', 'status', 'update_time']
allowedSelects: ['id', 'title', 'unit', 'base_price', 'status', 'update_time']
);
}
}

View File

@@ -270,10 +270,10 @@ Route::prefix('damages')
Route::get('/', 'index')->name('index');
Route::get('/list', 'list')->name('list')->withoutMiddleware('permission:manage-damage');
Route::post('/', 'store')->name('store');
Route::get('/excel', 'excel')->name('excel');
Route::get('/{damage}', 'show')->name('show');
Route::post('/{damage}', 'update')->name('update');
Route::post('/activate/{damage}', 'activate')->name('activate');
Route::get('/excel', 'excel')->name('excel');
});
Route::prefix('receipts')