toggleLike() 공개 정적인 메소드

Like or unlike a song on behalf of a user.
public static toggleLike ( string $songId, User $user ) : Interaction
$songId string
$user User
리턴 Interaction
예제 #1
0
 /**
  * Like or unlike a song as the currently authenticated user.
  *
  * @param Request $request
  *
  * @return \Illuminate\Http\JsonResponse
  */
 public function like(Request $request)
 {
     return response()->json(Interaction::toggleLike($request->input('song'), $request->user()));
 }