(Update) CRUDDY PT.4 🚀

This commit is contained in:
HDVinnie
2019-10-23 14:49:39 -04:00
parent dc2cf66405
commit 2979750a8f
97 changed files with 433 additions and 413 deletions
+3 -3
View File
@@ -33,13 +33,13 @@ class ThankController extends Controller
$torrent = Torrent::findOrFail($id);
if ($user->id === $torrent->user_id) {
return redirect()->route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])
return redirect()->route('torrent', ['id' => $torrent->id])
->withErrors('You Cannot Thank Your Own Torrent!');
}
$thank = Thank::where('user_id', '=', $user->id)->where('torrent_id', '=', $torrent->id)->first();
if ($thank) {
return redirect()->route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])
return redirect()->route('torrent', ['id' => $torrent->id])
->withErrors('You Have Already Thanked On This Torrent!');
}
@@ -53,7 +53,7 @@ class ThankController extends Controller
$torrent->notifyUploader('thank', $thank);
}
return redirect()->route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])
return redirect()->route('torrent', ['id' => $torrent->id])
->withSuccess('Your Thank Was Successfully Applied!');
}
}