<commit_before><?php

namespace TypiCMS\Modules\Pages\Http\Controllers;

use TypiCMS\Modules\Core\Http\Controllers\BaseAdminController;
use TypiCMS\Modules\Pages\Http\Requests\FormRequest;
use TypiCMS\Modules\Pages\Models\Page;
use TypiCMS\Modules\Pages\Repositories\EloquentPage;

class AdminController extends BaseAdminController
{
    public function __construct(EloquentPage $page)
    {
        parent::__construct($page);
    }

    /**
     * List models.
     *
     * @return \Illuminate\View\View
     */
    public function index()
    {
        $models = $this->repository->allNested([
            'id',
            'parent_id',
            'title',
            'position',
            'status',
            'private',
            'redirect',
            'module',
            'slug',
            'uri',
        ]);
        app('JavaScript')->put('models', $models);

        return view('pages::admin.index');
    }

    /**
     * Create form for a new resource.
     *<commit_msg>Repository: allNested method removed<commit_after><?php

namespace TypiCMS\Modules\Pages\Http\Controllers;

use TypiCMS\Modules\Core\Http\Controllers\BaseAdminController;
use TypiCMS\Modules\Pages\Http\Requests\FormRequest;
use TypiCMS\Modules\Pages\Models\Page;
use TypiCMS\Modules\Pages\Repositories\EloquentPage;

class AdminController extends BaseAdminController
{
    public function __construct(EloquentPage $page)
    {
        parent::__construct($page);
    }

    /**
     * List models.
     *
     * @return \Illuminate\View\View
     */
    public function index()
    {
        $models = $this->repository->findAll([
            'id',
            'parent_id',
            'title',
            'position',
            'status',
            'private',
            'redirect',
            'module',
            'slug',
            'uri',
        ])->nest();
        app('JavaScript')->put('models', $models);

        return view('pages::admin.index');
    }

    /**
     * Create form for a new resource.
     *
{'fraction_non_alphanumeric': 0.13125309559187717, 'fraction_numerical': 0.0, 'mean_word_length': 2.0839694656488548, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1547203', 'n_tokens_mistral': 596, 'n_tokens_neox': 604, 'n_words': 102}