public function show(CalendarRequest $request, Calendar $calendar)
    {

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

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

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

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

@param Request $request
@param Model   $calendar

@return Response
Display calendar .