src/Http/Controllers/MessageResourceController.php
public function show(MessageRequest $request, Message $message)
    {

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

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

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

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

@param Request $request
@param Model   $message

@return Response
Display message .