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

        if ($team->exists) {
            $view = 'team::team.show';
        } else {
            $view = 'team::team.new';
        }

        return $this->response->title(trans('app.view') . ' ' . trans('team::team.name'))
            ->data(compact('team'))
            ->view($view, true)
            ->output();
    }
public function show(TeamRequest $request, Team $team)
    {

        if ($team->exists) {
            $view = 'team::team.show';
        } else {
            $view = 'team::team.new';
        }

        return $this->response->title(trans('app.view') . ' ' . trans('team::team.name'))
            ->data(compact('team'))
            ->view($view, true)
            ->output();
    }
public function show ( TeamRequest $ request , Team $ team ) { if ( $ team -> exists ) { $ view = 'team::team.show' ; } else { $ view = 'team::team.new' ; } return $ this -> response -> title ( trans ( 'app.view' ) . ' ' . trans ( 'team::team.name' ) ) -> data ( compact ( 'team' ) ) -> view ( $ view , true ) -> output ( ) ; }
Display team.

@param Request $request
@param Model   $team

@return Response
Display team .