mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Search on status label type
This commit is contained in:
parent
4cf01e4f48
commit
72ec362f72
|
@ -49,7 +49,7 @@ class AssetsController extends Controller
|
|||
* @since [v4.0]
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function index(Request $request, $status = null)
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
||||
$this->authorize('index', Asset::class);
|
||||
|
@ -116,7 +116,7 @@ class AssetsController extends Controller
|
|||
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'assets.created_at';
|
||||
$assets->orderBy($sort, $order);
|
||||
|
||||
switch ($status) {
|
||||
switch ($request->input('status')) {
|
||||
case 'Deleted':
|
||||
$assets->withTrashed()->Deleted();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue