src/Http/Controllers/CategoryResourceController.php
public function show(CategoryRequest $request, Category $category)
    {

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

        return $this->response->setMetaTitle(trans('app.view') . ' ' . trans('block::category.name'))
            ->data(compact('category'))
            ->view($view)
            ->output();
    }
public function show(CategoryRequest $request, Category $category)
    {

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

        return $this->response->setMetaTitle(trans('app.view') . ' ' . trans('block::category.name'))
            ->data(compact('category'))
            ->view($view)
            ->output();
    }
public function show ( CategoryRequest $ request , Category $ category ) { if ( $ category -> exists ) { $ view = 'block::admin.category.show' ; } else { $ view = 'block::admin.category.new' ; } return $ this -> response -> setMetaTitle ( trans ( 'app.view' ) . ' ' . trans ( 'block::category.name' ) ) -> data ( compact ( 'category' ) ) -> view ( $ view ) -> output ( ) ; }
Display category.

@param Request $request
@param Model   $category

@return Response
Display category .