public function zan(Post $post){ $param=[ 'user_id'=>\Auth::id(), 'post_id'=>$post->id ] Zan::firstOrCreate($param);}