src/Traits/Favoriteable.php
/**
     * Remove this Object from the user favorites
     *
     * @param  int $user_id  [if  null its added to the auth user]
     * 
     */
Remove this Object from the user favorites

@param  int $user_id  [if  null its added to the auth user]
Remove this Object from the user favorites @param int $user_id [ if null its added to the auth user ]
public function removeFavorite($user_id = null)
    {
        $this->favorites()
            ->where('user_id', $user_id ?: Auth::id())
            ->where('session_id', Session::getId())
            ->delete();
        return true;
    }
public function removeFavorite ( $ user_id = null ) { $ this -> favorites ( ) -> where ( 'user_id' , $ user_id ? : Auth :: id ( ) ) -> where ( 'session_id' , Session :: getId ( ) ) -> delete ( ) ; return true ; }
Remove this Object from the user favorites
Remove this Object from the user favorites