Display a list of blog.

@return Response
512199
public function index(BlogRequest $request)
    {
        $view = $this->response->theme->listView();

        if ($this->response->typeIs('json')) {
            $function = camel_case('get-' . $view);
            return $this->repository
                ->setPresenter(\Litecms\Blog\Repositories\Presenter\BlogPresenter::class)
                ->$function();
        }

        $blogs = $this->repository->paginate();

        return $this->response->title(trans('blog::blog.names'))
            ->view('blog::blog.index', true)
            ->data(compact('blogs'))
            ->output();
    }
397578
public function list()
    {
        $response = $this->client->fetch(
            $this->uri,
            []
        );

        return json_encode($response->getContent(), JSON_FORCE_OBJECT);
    }
327234
public function listAction()
    {
        $request = $this->getRequest();

        $this->admin->checkAccess('list');

        $preResponse = $this->preList($request);
        if (null !== $preResponse) {
            return $preResponse;
        }

        if ($listMode = $request->get('_list_mode')) {
            $this->admin->setListMode($listMode);
        }

        $datagrid = $this->admin->getDatagrid();
        $formView = $datagrid->getForm()->createView();

        // set the theme for the current Admin Form
        $this->setFormTheme($formView, $this->admin->getFilterTheme());

        // NEXT_MAJOR: Remove this line and use commented line below it instead
        $template = $this->admin->getTemplate('list');
        // $template = $this->templateRegistry->getTemplate('list');

        return $this->renderWithExtraParams($template, [
            'action' => 'list',
            'form' => $formView,
            'datagrid' => $datagrid,
            'csrf_token' => $this->getCsrfToken('sonata.batch'),
            'export_formats' => $this->has('sonata.admin.admin_exporter') ?
                $this->get('sonata.admin.admin_exporter')->getAvailableFormats($this->admin) :
                $this->admin->getExportFormats(),
        ], null);
    }
1243042
public function actionPageviews()
	{
		$models = Events::model()->groupByUrl()->findAll();
		$response = array();

		foreach ($models as $model)
			$response[] = array(
				'uri' => $model->uri,
				'count' => $model->id
			);

		return $response;
	}
1009663
public function index()
    {
        return $this->core->api()->response(
            [
                'layout' => $this->transformPresencesForApi($this->menu->getMenuLayout()),
            ]
        );
    }
1085561
public function posts()
    {
        if (!class_exists(\Modules\Blog\Entities\Post::class, false)) {
            throw new \Exception('in order to use User::posts() you have to install the \'vain-blog\' module');
        }

        return $this->hasMany(\Modules\Blog\Entities\Post::class);
    }
151702
public function feedAction(Request $request, Blog $blog)
    {
        $articles = $blog->getPublishedArticles();
        if ($categoryId = $request->query->get('category')) {
            $entityManager = $this->getDoctrine()->getManager();
            /** @var Category $category */
            $category = $entityManager->getRepository('VictoireBlogBundle:BlogCategory')->find($categoryId);
            $categoryIds = [];

            function findIds(BlogCategory $category, &$categoryIds)
            {
                $categoryIds[] = $category->getId();

                foreach ($category->getChildren() as $childCategory) {
                    findIds($childCategory, $categoryIds);
                }
            }

            findIds($category, $categoryIds);

            $articles = $articles->filter(function ($article) use ($categoryIds) {
                /* @var Article $article */
                return $article->getCategory() && in_array($article->getCategory()->getId(), $categoryIds, true);
            });
        }

        return $this->render('VictoireBlogBundle:Blog:feed.rss.twig', [
            'blog'     => $blog,
            'articles' => $articles,
        ]);
    }
979829
public function listComments(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/comments',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
    }
377285
public function index()
    {
        $perPage = config('typicms.tags.per_page');
        $models = $this->repository->paginate($perPage);

        return view('tags::public.index')
            ->with(compact('models'));
    }
14066
public function index(Request $request)
	{
		
		$posts = Post::all();
		
		$bestTag = Tag::with('postCount')->get()->sortByDesc('postCount');
		
		$bestCat = Category::with('postCount')->get()->sortByDesc('postCount');
		
		\Debugbar::info($bestTag);
		
		return view('maikblog::table', [
				'posts' => $posts,
				'best_tag' => $bestTag,
				'best_cat' => $bestCat,
		]);
	}
648586
public function index()
    {
        $this->authorize(RedirectsPolicy::PERMISSION_LIST);

        $redirects = Redirect::query()->paginate(50);

        $this->setTitle($title = trans('seo::redirects.titles.redirections-list'));
        $this->addBreadcrumb($title);

        return $this->view('admin.redirects.index', compact('redirects'));
    }
376072
public function listAction()
    {
        $siterootManager = $this->get('phlexible_siteroot.siteroot_manager');

        $siteroots = [];
        foreach ($siterootManager->findAll() as $siteroot) {
            $siteroots[] = [
                'id' => $siteroot->getId(),
                'title' => $siteroot->getTitle(),
            ];
        }

        return new JsonResponse([
            'siteroots' => $siteroots,
            'count' => count($siteroots),
        ]);
    }
494162
public function listAction()
    {
        // Getting the Site config "MelisDemoCms.config.php"
        $siteConfig = $this->getServiceLocator()->get('config');
        $siteConfig = $siteConfig['site']['MelisDemoCms'];
        $siteDatas = $siteConfig['datas'];
        
        /**
         * Listing News using MelisCmsNewsListNewsPlugin
         */
		$listNewsPluginView = $this->MelisCmsNewsListNewsPlugin();
		$listNewsParameters = array(
		    'template_path' => 'MelisDemoCms/plugin/news-list',
            'pageId' => $this->idPage,
            'pageIdNews' => $siteDatas['news_details_page_id'],
	        'pagination' => array(
	            'nbPerPage' => 6
	        ),
	        'filter' => array(
	            'column' => 'cnews_publish_date',
	            'order' => 'DESC',
	            'unpublish_filter' => true,
	            'site_id' => $siteDatas['site_id'],
	        )
		);
		
		// add generated view to children views for displaying it in the contact view
		$this->view->addChild($listNewsPluginView->render($listNewsParameters), 'listNews');
        
		$this->view->setVariable('renderMode', $this->renderMode);
        $this->view->setVariable('idPage', $this->idPage);
        return $this->view;
    }
734534
public function posts()
    {
        $posts = Content::post()->latestPublish()->paginate(config('orchestra/story::per_page', 10));

        return Facile::view('orchestra/story::posts')->with(['posts' => $posts])->render();
    }
561902
public function index()
	{
        $this->table->setActions([
            'edit' => [
                'link' => url('backend/blog-categories/-id-/edit/'),
                'text' => '<i class="fa fa-pencil"></i> ' . trans('LaravelAdmin::laravel-admin.edit'),
                'class' => 'btn btn-primary btn-sm',
            ],
            'delete' => [
                'link' => url('backend/blog-categories/-id-/delete'),
                'text' => '<i class="fa fa-times"></i> ' . trans('LaravelAdmin::laravel-admin.delete'),
                'class' => 'btn btn-danger btn-sm confirm',
                'confirm' => true,
            ],
        ]);
        return view('LaravelAdminBlog::categories.index')
            ->with('table', $this->table->setModel($this->model)->render())
            ->with('activeMenu', 'sidebar.Blog.Categories');
	}
146743
public function getBlogPosts()
    {
        $blog_posts = BlogPost::get()
            ->filter('ParentID', $this->ID)
            ->where(sprintf('"PublishDate" < \'%s\'', Convert::raw2sql(DBDatetime::now())));

        $this->extend('updateGetBlogPosts', $blog_posts);
        return $blog_posts;
    }
895154
public function index()
    {
        $this->data['page']->title = 'Manage Blogs';

        // --------------------------------------------------------------------------

        //  Get blogs
        $this->data['blogs'] = $this->blog_model->getAll();

        if (empty($this->data['blogs'])) {

            if (!userHasPermission('admin:blog:blog:create')) {

                $status   = 'message';
                $message  = '<strong>You don\'t have a blog!</strong> Create a new blog ';
                $message .= 'in order to configure blog settings.';

                $this->session->set_flashdata($status, $message);

                redirect('admin/blog/blog/create');

            }
        }

        // --------------------------------------------------------------------------

        //  Add a header button
        if (userHasPermission('admin:blog:blog:create')) {

             Helper::addHeaderButton('admin/blog/blog/create', 'Create Blog');
        }

        // --------------------------------------------------------------------------

        //  Load views
        Helper::loadView('index');
    }