create function excel and their dependency for damage
This commit is contained in:
24
app/Services/Cartables/Damage/DamageService.php
Normal file
24
app/Services/Cartables/Damage/DamageService.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Cartables\Damage;
|
||||
|
||||
use App\Exceptions\ProhibitedAction;
|
||||
use App\Facades\DataTable\DataTableFacade;
|
||||
use App\Models\Damage;
|
||||
use App\Models\SafetyAndPrivacy;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class DamageService
|
||||
{
|
||||
public function dataTable(Request $request)
|
||||
{
|
||||
return DataTableFacade::run(
|
||||
Damage::query(),
|
||||
$request,
|
||||
allowedFilters: ['*'],
|
||||
allowedSortings: ['*'],
|
||||
allowedSelects: ['title', 'unit', 'base_price', 'status', 'update_time']
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user