src/Controllers/EventController.php
public function leave(Event $event)
    {
        $this->authorize('join', Event::class);
        $event->deleteUser(User::findOrfail(Auth::id()));

        return redirect()->route('laralum::events.index')
            ->with('success', __('laralum_events::general.left_event', ['id' => $event->id]));
    }
public function leave(Event $event)
    {
        $this->authorize('join', Event::class);
        $event->deleteUser(User::findOrfail(Auth::id()));

        return redirect()->route('laralum::events.index')
            ->with('success', __('laralum_events::general.left_event', ['id' => $event->id]));
    }
public function leave ( Event $ event ) { $ this -> authorize ( 'join' , Event :: class ) ; $ event -> deleteUser ( User :: findOrfail ( Auth :: id ( ) ) ) ; return redirect ( ) -> route ( 'laralum::events.index' ) -> with ( 'success' , __ ( 'laralum_events::general.left_event' , [ 'id' => $ event -> id ] ) ) ; }
Leave from the specified resource from storage.

@param \Laralum\Events\Models\Event $event

@return \Illuminate\Http\Response
Leave from the specified resource from storage .