Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bdsumon4u committed Oct 21, 2024
1 parent 9403bd0 commit 601eb7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Http/Controllers/Api/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ public function __invoke(Request $request)
]);
}
})
->addColumn('actions', function (Order $product) {
return '<div>
<a href="' . route('admin.orders.destroy', $product) . '" data-action="delete" class="btn btn-block btn-danger">Delete</a>
</div>';
})
->rawColumns(['checkbox', 'id', 'customer', 'products', 'status', 'courier', 'staff', 'created_at', 'actions'])
->make(true);
}
Expand Down
3 changes: 3 additions & 0 deletions resources/views/admin/orders/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
<th>Courier</th>
<th>Staff</th>
<th width="150">DateTime</th>
@if(auth()->user()->is('admin'))
<th width="10">Action</th>
@endif
</tr>
</thead>
</table>
Expand Down

0 comments on commit 601eb7c

Please sign in to comment.