Display a list of all blog post to admin.

@param  Request  $request
@return Response
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,
		]);
	}
393964
public function show(Request $request)
    {
        $thread = $this->api('thread.fetch', $request->route('thread'))
                       ->parameters(['include_deleted' => auth()->check()])
                       ->get();

        event(new UserViewingThread($thread));

        $category = $thread->category;

        $categories = [];
        if (Gate::allows('moveThreadsFrom', $category)) {
            $categories = $this->api('category.index')->parameters(['where' => ['category_id' => 0]], ['where' => ['enable_threads' => 1]])->get();
        }

        $posts = $thread->postsPaginated;

        return view('forum::thread.show', compact('categories', 'category', 'thread', 'posts'));
    }
856770
public function listAction($entity, Request $request)
    {
        $entityConfig = $this->get('lin3s_admin.configuration.factory.entity')->createFor($entity);
        $repository = $this->get($entityConfig->repositoryServiceId());
        $entities = $repository->findByRequest($request, $entityConfig);
        $totalCount = $repository->countAll($request, $entityConfig);

        return $this->render('@Lin3sAdmin/Admin/list.html.twig', [
            'entities'     => $entities,
            'entityConfig' => $entityConfig,
            'totalCount'   => $totalCount,
        ]);
    }
1037290
public function index(Request $request)
    {
        $input = $request->all();

        $result = $this->repository->paginated();

        return view('cms::modules.images.index')
            ->with('images', $result)
            ->with('pagination', $result->render());
    }
718485
public function getSeatUserList(Request $request)
    {

        return response()->json([
            'results' => DB::table('users')
                ->select('id', 'name as text')
                ->where('name', 'like', '%' . $request->q . '%')
                ->orderBy('name', 'asc')
                ->get(),
        ]);
    }
407793
public function pagesListAction(Request $request)
    {
        $repository = $this->get('ekyna_cms.page.repository');

        $lastModifiedAt = $repository->getLastUpdatedAt();

        $response = new Response();
        $response->headers->set('Content-Type', 'application/json');
        $response->setLastModified($lastModifiedAt);

        if ($response->isNotModified($request)) {
            return $response;
        }

        $documentLocale = $request->query->get('document_locale', $request->getLocale());
        $list = [];

        /** @var \Ekyna\Bundle\CmsBundle\Model\PageInterface[] $pages */
        $pages = $this
            ->get('ekyna_cms.page.repository')
            ->findBy(['dynamicPath' => false], ['left' => 'ASC']);

        foreach ($pages as $page) {
            $list[] = $this->pageToArray($page, $documentLocale);
        }

        return $response->setContent(json_encode($list));
    }
261982
public function getAll(Request $request)
    {
        $this->authorize(MediasPolicy::PERMISSION_LIST);

        return $this->jsonResponseSuccess([
            'medias' => $this->media->all(
                $request->get('location', '/')
            ),
        ]);
    }
1316254
public function siteArchiveListAction(Request $request)
    {
        $baseQuery = ['s.state' => SiteState::ARCHIVE];

        if (!$this->isGranted([Access::PERM_SITE_GOD, Access::PERM_SITE_MANAGE_ALL, Access::PERM_SITE_VIEW_ALL])) {
            $baseQuery['uid'] = $this->getCurrentUserId();
        }

        return $this->renderPage('ucms_site.list_all', $request, [
            'base_query' => [
                'uid' => $baseQuery,
            ],
        ]);
    }
39857
public function indexAction(Request $request)
    {
        $channel = $this->getSelectedChannel();

        $builder = $this->getDocumentManager()->createQueryBuilder(ContentTypePage::class)
            ->field('channel.$id')->equals($channel->getId());

        $pagination = $this->getPaginator()->paginate(
            $builder,
            $request->query->get('page', 1),
            20
        );

        return [
            'pages' => $pagination,
            'channels' => $this->getChannels(),
            'selectedChannel' => $channel,
        ];
    }
671136
public function search(Request $request)
    {
        $features = $this->service->search($request->search, null);
        return view('admin.features.index')->with('features', $features);
    }
210959
public function index(Request $request)
    {
        $this->validate($request, ['category_id' => ['required']]);

        $threads = $this->model()
            ->withRequestScopes($request)
            ->where('category_id', $request->input('category_id'))
            ->get();

        return $this->response($threads);
    }
1256517
public function listAction(Request $request): Response
    {
        $deletableContentTypeGroup = [];
        $count = [];

        $page = $request->query->get('page') ?? 1;

        $pagerfanta = new Pagerfanta(
            new ArrayAdapter($this->contentTypeService->loadContentTypeGroups())
        );

        $pagerfanta->setMaxPerPage($this->defaultPaginationLimit);
        $pagerfanta->setCurrentPage(min($page, $pagerfanta->getNbPages()));

        /** @var \eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup[] $contentTypeGroupList */
        $contentTypeGroupList = $pagerfanta->getCurrentPageResults();

        $deleteContentTypeGroupsForm = $this->formFactory->deleteContentTypeGroups(
            new ContentTypeGroupsDeleteData($this->getContentTypeGroupsNumbers($contentTypeGroupList))
        );

        foreach ($contentTypeGroupList as $contentTypeGroup) {
            $contentTypesCount = count($this->contentTypeService->loadContentTypes($contentTypeGroup));
            $deletableContentTypeGroup[$contentTypeGroup->id] = !(bool)$contentTypesCount;
            $count[$contentTypeGroup->id] = $contentTypesCount;
        }

        return $this->render('@ezdesign/admin/content_type_group/list.html.twig', [
            'pager' => $pagerfanta,
            'form_content_type_groups_delete' => $deleteContentTypeGroupsForm->createView(),
            'deletable' => $deletableContentTypeGroup,
            'content_types_count' => $count,
            'can_create' => $this->isGranted(new Attribute('class', 'create')),
            'can_update' => $this->isGranted(new Attribute('class', 'update')),
            'can_delete' => $this->isGranted(new Attribute('class', 'delete')),
        ]);
    }
432674
public function listAction(Request $request)
    {
        $this->buildBreadcrumbs($this->getType());

        $queryBuilder = $this->getDoctrine()
            ->getManager()
            ->createQueryBuilder()
            ->select('e')
            ->from($this->getEntityName($this->getType()), 'e')
            ->orderBy('e.id', 'DESC');

        $adapter = new DoctrineORMAdapter($this->alterListQuery($queryBuilder));
        $data = new Pagerfanta($adapter);
        $data->setCurrentPage($request->query->get('page', 1));

        $module = $this->getModule($this->getType());

        return $this->render($this->getListTemplate(), array_merge(array(
            'data' => $data,
            'type' => $this->getType(),
            'module' => $module,
            'submodules' => $this->getSubmodules($module),
        ), $this->getExtraListVariables()));
    }
407196
public function listAction(Request $request)
    {
        return $this->render('SynapsePageBundle:Admin/Page:list.html.twig', array(
            'pages' => $this->container->get('synapse.page.loader')->retrieveAll(),
            'page_rendering_route' => $this->container->getParameter('synapse.page.rendering_route'),
        ));
    }
946745
public function listElement(Request $request)
    {
        $baseIds = array_keys($this->getAclForUser()->get_granted_base([\ACL::CANADDRECORD]));

        $lazaretFiles = null;
        $perPage = 10;
        $page = max(1, $request->query->get('page', 1));
        $offset = ($page - 1) * $perPage;

        if (count($baseIds) > 0) {
            $lazaretFiles = $this->getLazaretFileRepository()->findPerPage($baseIds, $offset, $perPage);
        }

        return $this->render('prod/upload/lazaret.html.twig', [
            'lazaretFiles' => $lazaretFiles,
            'currentPage'  => $page,
            'perPage'      => $perPage,
        ]);
    }
781083
public function index(Request $request)
    {
        $rows = $this->tagRepo->findAndPaginate($request);

        return view('admin.tags.list', compact('rows'));
    }
759214
public function indexAction(Request $request)
    {
        $page = $request->get("page", 1);
        $em = $this->getDoctrine()->getManager();

        $filter = [
            'q' => $request->get('q'),
            'category' => $request->get('filter_category'),
            'is_enabled' => $request->get('is_enabled', true),
        ];

        $qb = $em->getRepository(Product::class)->findAllFilteredQB($filter);

        $paginator = $this->get('knp_paginator');
        $pagination = $paginator->paginate($qb, $page, 40);

        return array(
            'pagination' => $pagination,
            'filter' => $filter,
        );
    }