1 week ago

How do I delete row in many to many relationship in view.blade?

Posted 1 week ago by lily90

I create 3 table which are user event and event_user. How do I put call in my view.blade?

  public function destroy($id)
        $event= Event::find($id);
        return view('user.event.applied');
  @foreach ($events as $event)
                                            <td>{{$loop->index +1 }}</td>
                                              <form method="POST" action="{{ route('user.event.destroy',$event)}}">
                                                <a class="btn btn-danger">Unjoined!</a> 

Please sign in or create an account to participate in this conversation.