fix code and add id for get
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user