src/Http/Controllers/ContentController.php
/**
     * Display a listing of the resource.
     *
     * @return \Symfony\Component\HttpFoundation\Response
     */
Display a listing of the resource.
Display a listing of the resource .
public function index(Request $request)
    {
        $contentFolder = $this->content->getRoot();
        $content = $this->content->listFolder($request, $contentFolder);
        if (! $request->has('search')) {
            $contentTypes = $this->content->getCreatableContentTypes($contentFolder->id);
            $shortcuts = $this->content->getShortcuts($contentFolder);
            $isMovable = $content->where('is_movable', true)->count() ? true : false;
        } else {
            app('soda.interface')->breadcrumbs()->addLink(route('soda.content.index'), ucfirst(trans('soda::terminology.content_plural')));
            app('soda.interface')->setHeading('Search');
        }
        return soda_cms_view('data.content.index', compact('contentFolder', 'content', 'contentTypes', 'shortcuts', 'isMovable'));
    }
public function index ( Request $ request ) { $ contentFolder = $ this -> content -> getRoot ( ) ; $ content = $ this -> content -> listFolder ( $ request , $ contentFolder ) ; if ( ! $ request -> has ( 'search' ) ) { $ contentTypes = $ this -> content -> getCreatableContentTypes ( $ contentFolder -> id ) ; $ shortcuts = $ this -> content -> getShortcuts ( $ contentFolder ) ; $ isMovable = $ content -> where ( 'is_movable' , true ) -> count ( ) ? true : false ; } else { app ( 'soda.interface' ) -> breadcrumbs ( ) -> addLink ( route ( 'soda.content.index' ) , ucfirst ( trans ( 'soda::terminology.content_plural' ) ) ) ; app ( 'soda.interface' ) -> setHeading ( 'Search' ) ; } return soda_cms_view ( 'data.content.index' , compact ( 'contentFolder' , 'content' , 'contentTypes' , 'shortcuts' , 'isMovable' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .