public function show(TaskRequest $request, Task $task)
    {

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

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

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

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

@param Request $request
@param Model   $task

@return Response
Display task .