index
@return json
961387
public function index(Request $request)
    {
        $permissions = Permission::browse([
            'order'     => [ Input::get('sort', 'id') => Input::get('direction', 'desc') ],
            'limit'     => ($limit = (int)Input::get('limit', 25)),
            'offset'    => (Input::get('page', 1) - 1) * $limit,
            'filters'   => $request->all()
        ]);

        return response()->json(arrayView('phpsoft.users::permission/browse', [
            'permissions' => $permissions,
        ]), 200);
    }
1172092
public function index()
    {
        $pages = $this->Pages->find('threaded')
            ->contain(['Collections'])
            ->order(['lft' => 'ASC']);
        $this->set([
            'pages' => $pages,
            'closedPages' => isset($_COOKIE['closed_pages']) ? json_decode($_COOKIE['closed_pages'], true) : [],
            'reorderUrl' => Router::url([
                'plugin' => 'Wasabi/Cms',
                'controller' => 'Pages',
                'action' => 'reorderPages'
            ])
        ]);
    }
35079
public function toJson()
    {
        $json = array();
        $json['id'] = $this->id;
        $json['from'] = $this->from;
        $json['color'] = $this->color;
        $json['message'] = $this->message;
        $json['notify'] = $this->notify;
        $json['message_format'] = $this->messageFormat;
        $json['date'] = $this->date;

        return $json;

    }
500189
public function actionIndex()
    {
        $searchModel = Yii::createObject($this->searchClass);
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render($this->indexView, [
            'dataProvider' => $dataProvider,
            'searchModel' => $searchModel,
        ]);
    }
752566
public function index()
    {
        if (request()->ajax()) {
            return response()->json([
                'status' => true,
                'files' => $this->model
                    ->when('owner' != user('role'), function ($query) {
                        // Show files only to current user.
                        $query->where('user_id', user('id'));
                    })
                    ->filter(request([
                        'attachment_id',
                        'attachment_type',
                    ]))
                    ->get(),
            ], 200);
        }

        return $this->makeResponse('index', [
            'filetype' => html_secure(request('filetype', null)),
            'files' => $this->model
                ->with([
                    'attachment'
                ])
                ->when('owner' != user('role'), function ($query) {
                    // Show files only to current user.
                    $query->where('user_id', user('id'));
                })
                // Show files only to articles.
                // ->where('attachment_type', (new Article)->getMorphClass())
                ->filter(request(['filetype', 'user']))
                ->latest()
                ->paginate(18)
                ->appends(
                    request()->except(['page'])
                )
        ]);
    }
423827
public function index()
    {
        return $this->render('index', [
            'model' => $this->model,
            'endpoints' => $this->getAvailableApiEndpoints(),
            'groupsCount' => $this->model->getGroups()->count(),
        ]);
    }
1178434
public function toJSON()
    {   
        $allvals = Array();
        $reflection = new \ReflectionObject($this);
        $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC);
        foreach($properties as $prop){
            $propkey = $prop->getName();
            $allvals[$propkey] = $this->$propkey;
        }
        $json = json_encode($allvals, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
        return $json;
    }
660760
protected function getJson()
    {
        if ($this->str_request_body_json === null) {
            $this->str_request_body_json = json_decode($this->getBody());
        }
        return $this->str_request_body_json;
    }
357248
public function index()
    {
        $urls = [];
        foreach ($this->actions as $action => $description) {
            $fired = \Illuminate\Support\Facades\Event::fire('analyzer:before.' . $action);
            if (!empty($fired)) {
                array_push($urls, current($fired));
            }
            array_push($urls, [
                'url'         => handles('antares::logger/analyze/' . $action, ['csrf' => true]),
                'description' => $description,
            ]);
        }
        return new JsonResponse($urls);
    }
1113967
public function index()
    {
        return $this->render('index', [
            'model' => $this->model,
            'images' => Yii::$app->storage->findImages(['filter_id' => $this->model->id]),
        ]);
    }
781972
public function index()
    {
        $items = News::active()->orderBy('created_at', 'DESC')->get()->take(6);

        return $this->view('titan::home')->with('news', $items)->with('hidePageFooter', true);
    }
824764
public function getJson() {
		$json = [
			'title' => $this->title,
			'author' => $this->author,
			'show_cover_pic' => $this->show_cover_pic,
			'digest' => $this->digest,
			'content_source_url' => $this->content_source_url,
		];
		if($this->manager) {
			$materialMedia = $this->thumbMaterialMedia;
			$json['thumb_media_id'] = $materialMedia->media_id;
			$json['thumb_material_media_id'] = $materialMedia->id;
			$json['content'] = $this->wechatContent;
		} else {
			$json['thumb_url'] = $this->thumbMaterial->url;
			$json['content'] = $this->content;
		}
		
		return $json;
	}
155961
public function getIndex()
    {
        $this->di->get("auth")->isAdmin(true);

        $user = new User();
        $user->setDb($this->di->get("db"));

        $title      = "Min sida";
        $view       = $this->di->get("view");
        $pageRender = $this->di->get("pageRender");


        $data = [
            "title" => $title,
            "users" => $user->findAll(),
        ];

        $view->add("admin/index", $data);

        $pageRender->renderPage(["title" => $title]);
    }
135022
public function actionIndex()
    {
        $this->getSearchCriteria();
        $this->layout = static::TABLE_LAYOUT;
        return $this->render('index', [
            'searchModel' => $this->searchModel,
            'dataProvider' => $this->dataProvider,
        ]);
    }
744799
public function index()
    {
        $articles = $this->repository->allOrSearch(Input::get('q'));

        $no = $articles->firstItem();

        return $this->view('articles.index', compact('articles', 'no'));
    }
511441
public function index(): JsonResponse
    {
        $config = $this->makeView('language-view', trans('HCCore::languages.title.list'))
            ->addFormSource('add-new', 'language')
            ->addDataTable($this->getDataTable())
            ->setPermissions(['search'])
            ->toArray();

        return $this->response->success('OK', $config);
    }
142016
public function index()
    {
        return $this->render('index', [
            'pages' => $this->model->getNavItemPageBlockItems()->select(['nav_item_page_id'])->distinct()->orderBy([])->all(),
        ]);
    }