mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 10:08:31 -05:00
(Update) WishController
Send to new routes.
This commit is contained in:
@@ -50,9 +50,7 @@ class WishController extends Controller
|
||||
*/
|
||||
public function index($uid)
|
||||
{
|
||||
$wishes = $this->wish->getUserWishes($uid);
|
||||
|
||||
return view('user.wishlist', ['wishes' => $wishes]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -76,7 +74,7 @@ class WishController extends Controller
|
||||
$omdb = $this->wish->omdbRequest($imdb);
|
||||
if ($omdb === null || $omdb === false) {
|
||||
return redirect()
|
||||
->route('wishlist', ['id' => $uid])
|
||||
->route('user_wishlist', ['slug' => auth()->user()->slug, 'id' => $uid])
|
||||
->with($this->toastr->error('IMDB Bad Request!', 'Whoops!', ['options']));
|
||||
}
|
||||
|
||||
@@ -91,7 +89,7 @@ class WishController extends Controller
|
||||
]);
|
||||
|
||||
return redirect()
|
||||
->route('wishlist', ['id' => $uid])
|
||||
->route('user_wishlist', ['slug' => auth()->user()->slug, 'id' => $uid])
|
||||
->with($this->toastr->success('Wish Successfully Added!', 'Yay!', ['options']));
|
||||
}
|
||||
|
||||
@@ -108,7 +106,7 @@ class WishController extends Controller
|
||||
$this->wish->delete($id);
|
||||
|
||||
return redirect()
|
||||
->route('wishlist', ['id' => $uid])
|
||||
->route('user_wishlist', ['slug' => auth()->user()->slug, 'id' => $uid])
|
||||
->with($this->toastr->success('Wish Successfully Removed!', 'Yay!', ['options']));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user