File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1212use App \Models \Reply ;
1313use App \Models \ReplyAble ;
1414use App \Models \Thread ;
15- use App \Jobs \DislikeReply ;
15+ use App \Jobs \UnlikeReply ;
1616use App \Policies \ReplyPolicy ;
1717use Illuminate \Auth \Middleware \Authenticate ;
1818use Illuminate \Http \RedirectResponse ;
@@ -71,9 +71,9 @@ public function like(Reply $reply)
7171 return back ();
7272 }
7373
74- public function dislike (Reply $ reply )
74+ public function unlike (Reply $ reply )
7575 {
76- $ this ->dispatchNow (new DislikeReply ($ reply , auth ()->user ()));
76+ $ this ->dispatchNow (new UnlikeReply ($ reply , auth ()->user ()));
7777
7878 return back ();
7979 }
Original file line number Diff line number Diff line change 55use App \User ;
66use App \Models \Reply ;
77
8- class DislikeReply
8+ class UnlikeReply
99{
1010 /**
1111 * @var \App\Models\Reply
1212 */
1313 private $ reply ;
1414
1515 /**
16- * @var \App\Jobs\ User
16+ * @var \App\User
1717 */
1818 private $ user ;
1919
2020 /**
2121 * Create a new job instance.
2222 *
2323 * @param \App\Models\Reply $reply
24- * @param \App\Jobs\ User $user
24+ * @param \App\User $user
2525 */
2626 public function __construct (Reply $ reply , User $ user )
2727 {
Original file line number Diff line number Diff line change 7171Route::get ('replies/{reply}/edit ' , 'ReplyController@edit ' )->name ('replies.edit ' );
7272Route::put ('replies/{reply} ' , 'ReplyController@update ' )->name ('replies.update ' );
7373Route::delete ('replies/{reply} ' , 'ReplyController@delete ' )->name ('replies.delete ' );
74- Route::put ('replies/{reply}/like ' , [ ' as ' => 'replies.like ' , ' uses ' => ' ReplyController@like ' ] );
75- Route::delete ('replies/{reply}/dislike ' , [ ' as ' => 'replies.dislike ' , ' uses ' => ' ReplyController@dislike ' ] );
74+ Route::put ('replies/{reply}/like ' , ' ReplyController@like ' )-> name ( 'replies.like ' );
75+ Route::delete ('replies/{reply}/unlike ' , ' ReplyController@unlike ' )-> name ( 'replies.unlike ' );
7676
7777// Subscriptions
7878Route::get ('subscriptions/{subscription}/unsubscribe ' , 'SubscriptionController@unsubscribe ' )
You can’t perform that action at this time.
0 commit comments