src/Http/Controllers/TeamResourceController.php
public function destroy(TeamRequest $request, Team $team)
    {
        try {

            $team->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('team::team.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('team/team/0'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        }

    }
public function destroy(TeamRequest $request, Team $team)
    {
        try {

            $team->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('team::team.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('team/team/0'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        }

    }
public function destroy ( TeamRequest $ request , Team $ team ) { try { $ team -> delete ( ) ; return $ this -> response -> message ( trans ( 'messages.success.deleted' , [ 'Module' => trans ( 'team::team.name' ) ] ) ) -> code ( 202 ) -> status ( 'success' ) -> url ( guard_url ( 'team/team/0' ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'team/team/' . $ team -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Remove the team.

@param Model   $team

@return Response
Remove the team .