<commit_before><?php

use Illuminate\Database\Seeder;

class AclTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $read = factory(App\Models\Acl\Permission::class)->create([
            'code'      => 'read',
            'name'     => 'read',
            'description'  => 'read'
        ]);
        $update = factory(App\Models\Acl\Permission::class)->create([
            'code'      => 'update',
            'name'     => 'update',
            'description'  => 'update'
        ]);
        $destroy = factory(App\Models\Acl\Permission::class)->create([
            'code'      => 'destroy',
            'name'     => 'destroy',
            'description'  => 'destroy'
        ]);
        $create = factory(App\Models\Acl\Permission::class)->create([
            'code'      => 'create',
            'name'     => 'create',
            'description'  => 'create'
        ]);
        $sadmin = factory(App\Models\Acl\Role::class)->create([
            'code'      => 'super-admin',
            'name'     => 'Super Administrator',
            'description'  => 'Super Administrator'
        ]);
        $section = factory(App\Models\Acl\Section::class)->create([
            'code'      => 'test.custom',
            'name'     => 'Test controller',
            'description'  => 'Test controller section'
        ]);

        $user = factory(Config::get('acl.user','\App\User'))->create([
            'name'      => '<NAME>',
            'email'     => '<EMAIL>',
            'password'  => <PASSWORD>('<PASSWORD>')
        ]);
        $user->roles()->save($sadmin);
        factory(App\Models\Acl\PermissionRoleSection::class)->create([
            'permission_id' => $read->id,
            'role_id'       => $sadmin->id,
            'section_id'    => $section->id
        ]);
        factory(App\Models\Acl\PermissionRoleSection::class)->create([
            'permission_id' => $update->id,
            'role_id'       => $sadmin->id,
            'section_id'    => $section->id
        ]);
        factory(App\Models\Acl\PermissionRoleSection::class)->create([
            'permission_id' => $destroy->id,
            'role_id'       => $sadmin->id,
            'section_id'    => $section->id
        ]);

        factory(App\Models\Acl\PermissionSectionUser::class)->create([
            'permission_id' => $create->id,
            'section_id'    => $section->id,
            'user_id'       => $user->id
        ]);
    }
}
<commit_msg>Use Config<commit_after><?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Config;
class AclTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $read = factory(App\Models\Acl\Permission::class)->create([
            'code'      => 'read',
            'name'     => 'read',
            'description'  => 'read'
        ]);
        $update = factory(App\Models\Acl\Permission::class)->create([
            'code'      => 'update',
            'name'     => 'update',
            'description'  => 'update'
        ]);
        $destroy = factory(App\Models\Acl\Permission::class)->create([
            'code'      => 'destroy',
            'name'     => 'destroy',
            'description'  => 'destroy'
        ]);
        $create = factory(App\Models\Acl\Permission::class)->create([
            'code'      => 'create',
            'name'     => 'create',
            'description'  => 'create'
        ]);
        $sadmin = factory(App\Models\Acl\Role::class)->create([
            'code'      => 'super-admin',
            'name'     => 'Super Administrator',
            'description'  => 'Super Administrator'
        ]);
        $section = factory(App\Models\Acl\Section::class)->create([
            'code'      => 'test.custom',
            'name'     => 'Test controller',
            'description'  => 'Test controller section'
        ]);

        $user = factory(Config::get('acl.user','\App\User'))->create([
            'name'      => '<NAME>',
            'email'     => '<EMAIL>',
            'password'  => <PASSWORD>('<PASSWORD>')
        ]);
        $user->roles()->save($sadmin);
        factory(App\Models\Acl\PermissionRoleSection::class)->create([
            'permission_id' => $read->id,
            'role_id'       => $sadmin->id,
            'section_id'    => $section->id
        ]);
        factory(App\Models\Acl\PermissionRoleSection::class)->create([
            'permission_id' => $update->id,
            'role_id'       => $sadmin->id,
            'section_id'    => $section->id
        ]);
        factory(App\Models\Acl\PermissionRoleSection::class)->create([
            'permission_id' => $destroy->id,
            'role_id'       => $sadmin->id,
            'section_id'    => $section->id
        ]);

        factory(App\Models\Acl\PermissionSectionUser::class)->create([
            'permission_id' => $create->id,
            'section_id'    => $section->id,
            'user_id'       => $user->id
        ]);
    }
}

{'fraction_non_alphanumeric': 0.17822943130740668, 'fraction_numerical': 0.0, 'mean_word_length': 1.665625, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 127, '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': '2541057', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1485, 'n_words': 215}