|
|
@ -49,7 +49,8 @@ class ItemController extends Controller |
|
|
|
$item = Item::findOrFail($id); |
|
|
|
$item->pinned = true; |
|
|
|
$item->save(); |
|
|
|
return redirect()->route('dash', [], false); |
|
|
|
$route = route('dash', [], false); |
|
|
|
return redirect($route); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -62,7 +63,8 @@ class ItemController extends Controller |
|
|
|
$item = Item::findOrFail($id); |
|
|
|
$item->pinned = false; |
|
|
|
$item->save(); |
|
|
|
return redirect()->route('dash', [], false); |
|
|
|
$route = route('dash', [], false); |
|
|
|
return redirect($route); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -81,8 +83,9 @@ class ItemController extends Controller |
|
|
|
$data['ajax'] = true; |
|
|
|
return view('sortable', $data); |
|
|
|
} else { |
|
|
|
return redirect()->route('dash', [], false); |
|
|
|
} |
|
|
|
$route = route('dash', [], false); |
|
|
|
return redirect($route); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -151,7 +154,8 @@ class ItemController extends Controller |
|
|
|
|
|
|
|
$item->parents()->sync($request->tags); |
|
|
|
|
|
|
|
return redirect()->route('dash', [], false) |
|
|
|
$route = route('dash', [], false); |
|
|
|
return redirect($route) |
|
|
|
->with('success', __('app.alert.success.item_created')); |
|
|
|
} |
|
|
|
|
|
|
@ -214,7 +218,8 @@ class ItemController extends Controller |
|
|
|
|
|
|
|
$item->parents()->sync($request->tags); |
|
|
|
|
|
|
|
return redirect()->route('dash', [], false) |
|
|
|
$route = route('dash', [], false); |
|
|
|
return redirect($route) |
|
|
|
->with('success',__('app.alert.success.item_updated')); |
|
|
|
} |
|
|
|
|
|
|
@ -235,8 +240,9 @@ class ItemController extends Controller |
|
|
|
} else { |
|
|
|
Item::find($id)->delete(); |
|
|
|
} |
|
|
|
|
|
|
|
return redirect()->route('items.index', [], false) |
|
|
|
|
|
|
|
$route = route('items.index', [], false); |
|
|
|
return redirect($route) |
|
|
|
->with('success',__('app.alert.success.item_deleted')); |
|
|
|
} |
|
|
|
|
|
|
@ -251,8 +257,10 @@ class ItemController extends Controller |
|
|
|
// |
|
|
|
Item::withTrashed() |
|
|
|
->where('id', $id) |
|
|
|
->restore(); |
|
|
|
return redirect()->route('items.index', [], false) |
|
|
|
->restore(); |
|
|
|
|
|
|
|
$route = route('items.inded', [], false); |
|
|
|
return redirect($route) |
|
|
|
->with('success',__('app.alert.success.item_restored')); |
|
|
|
} |
|
|
|
|
|
|
|