@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return [ |
| 21 | 21 | 'checkbox' => view('components.datatables.checkbox', [ |
| 22 | - 'id' => 'customer_' . $this->resource->getKey(), |
|
| 22 | + 'id' => 'customer_'.$this->resource->getKey(), |
|
| 23 | 23 | ])->render(), |
| 24 | 24 | 'username' => $this->resource->username, |
| 25 | 25 | 'fullname' => $this->resource->fullname, |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return [ |
| 21 | 21 | 'checkbox' => view('components.datatables.checkbox', [ |
| 22 | - 'id' => 'user_' . $this->resource->getKey(), |
|
| 22 | + 'id' => 'user_'.$this->resource->getKey(), |
|
| 23 | 23 | ])->render(), |
| 24 | 24 | 'branch_name' => view('components.datatables.link', [ |
| 25 | 25 | 'url' => route('branch.edit', $this->resource->branch), |
@@ -19,13 +19,13 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return [ |
| 21 | 21 | 'checkbox' => view('components.datatables.checkbox', [ |
| 22 | - 'id' => 'branch_' . $this->resource->getKey(), |
|
| 22 | + 'id' => 'branch_'.$this->resource->getKey(), |
|
| 23 | 23 | ])->render(), |
| 24 | 24 | 'name' => $this->resource->name, |
| 25 | 25 | 'address' => $this->resource->address, |
| 26 | 26 | 'google_map_url' => view('components.datatables.link', [ |
| 27 | 27 | 'url' => $this->resource->google_map_url, |
| 28 | - 'name' => $this->resource->address_latitude . ' | ' . $this->resource->address_longitude, |
|
| 28 | + 'name' => $this->resource->address_latitude.' | '.$this->resource->address_longitude, |
|
| 29 | 29 | 'is_new_tab' => true, |
| 30 | 30 | ])->render(), |
| 31 | 31 | 'action' => view('components.datatables.link', [ |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return [ |
| 21 | 21 | 'checkbox' => view('components.datatables.checkbox', [ |
| 22 | - 'id' => 'configuration_' . $this->resource->getKey(), |
|
| 22 | + 'id' => 'configuration_'.$this->resource->getKey(), |
|
| 23 | 23 | ])->render(), |
| 24 | 24 | 'key' => $this->resource->key, |
| 25 | 25 | 'value' => $this->resource->value, |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return [ |
| 21 | 21 | 'checkbox' => view('components.datatables.checkbox', [ |
| 22 | - 'id' => 'order_' . $this->resource->getKey(), |
|
| 22 | + 'id' => 'order_'.$this->resource->getKey(), |
|
| 23 | 23 | ])->render(), |
| 24 | 24 | 'code' => $this->resource->code, |
| 25 | 25 | 'customer_fullname' => view('components.datatables.link', [ |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return [ |
| 21 | 21 | 'checkbox' => view('components.datatables.checkbox', [ |
| 22 | - 'id' => 'role' . $this->resource->getKey(), |
|
| 22 | + 'id' => 'role'.$this->resource->getKey(), |
|
| 23 | 23 | ])->render(), |
| 24 | 24 | 'name' => $this->resource->name, |
| 25 | 25 | 'guard_name' => $this->resource->guard_name, |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | public function datatable() |
| 28 | 28 | { |
| 29 | 29 | return DataTables::eloquent(Role::query()) |
| 30 | - ->setTransformer(fn ($model) => RoleResource::make($model)->resolve()) |
|
| 30 | + ->setTransformer(fn($model) => RoleResource::make($model)->resolve()) |
|
| 31 | 31 | ->toJson(); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | public function datatable() |
| 28 | 28 | { |
| 29 | 29 | return DataTables::eloquent(Order::query()->with('user:id,name')) |
| 30 | - ->setTransformer(fn ($model) => OrderResource::make($model)->resolve()) |
|
| 30 | + ->setTransformer(fn($model) => OrderResource::make($model)->resolve()) |
|
| 31 | 31 | ->toJson(); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -28,22 +28,22 @@ |
||
| 28 | 28 | public function datatable() |
| 29 | 29 | { |
| 30 | 30 | return DataTables::eloquent(User::query()->with('branch:id,name')) |
| 31 | - ->setTransformer(fn ($model) => UserResource::make($model)->resolve()) |
|
| 32 | - ->orderColumn('branch_name', function ($query, $direction) { |
|
| 33 | - $query->with(['branch' => function ($query) use ($direction) { |
|
| 31 | + ->setTransformer(fn($model) => UserResource::make($model)->resolve()) |
|
| 32 | + ->orderColumn('branch_name', function($query, $direction) { |
|
| 33 | + $query->with([ 'branch' => function($query) use ($direction) { |
|
| 34 | 34 | $query->orderBy('name', $direction); |
| 35 | - }]); |
|
| 35 | + } ]); |
|
| 36 | 36 | }) |
| 37 | - ->filterColumn('branch_name', function ($query, $keyword) { |
|
| 38 | - $query->with(['branch' => function ($query) use ($keyword) { |
|
| 37 | + ->filterColumn('branch_name', function($query, $keyword) { |
|
| 38 | + $query->with([ 'branch' => function($query) use ($keyword) { |
|
| 39 | 39 | $query->where('name', 'like', $keyword); |
| 40 | - }]); |
|
| 40 | + } ]); |
|
| 41 | 41 | }) |
| 42 | - ->filterColumn('is_active', function ($query, $keyword) { |
|
| 42 | + ->filterColumn('is_active', function($query, $keyword) { |
|
| 43 | 43 | $active = Str::lower(trans('Active')); |
| 44 | 44 | $notActive = Str::lower(trans('Not Active')); |
| 45 | 45 | |
| 46 | - if (in_array($keyword, [$active, $notActive])) { |
|
| 46 | + if (in_array($keyword, [ $active, $notActive ])) { |
|
| 47 | 47 | $query->where('is_active', $keyword === $active); |
| 48 | 48 | } |
| 49 | 49 | }) |