public function create(User $user, array $input): void
    {
        $memory = \app('orchestra.memory')->make();

        // Bootstrap auth services, so we can use orchestra/auth package
        // configuration.
        $actions = ['Manage Orchestra', 'Manage Users'];
        $admin = \config('orchestra/foundation::roles.admin', 1);
        $roles = Role::pluck('name', 'id')->all();
        $theme = [
            'frontend' => 'default',
            'backend' => 'default',
        ];

        // Attach Administrator role to the newly created administrator.
        $user->roles()->sync([$admin]);

        // Add some basic configuration for Orchestra Platform, including
        // email configuration.
        $memory->put('site.name', $input['site_name']);
        $memory->put('site.theme', $theme);
        $memory->put('email', \config('mail'));
        $memory->put('email.from', [
            'name' => $input['site_name'],
            'address' => $input['email'],
        ]);

        // We should also create a basic ACL for Orchestra Platform, since
        // the basic roles is create using Fluent Query Builder we need
        // to manually insert the roles.
        $acl = \app('orchestra.platform.acl');

        $acl->attach($memory);
        $acl->actions()->attach($actions);
        $acl->roles()->attach(\array_values($roles));
        $acl->allow($roles[$admin], $actions);

        \event('orchestra.install: acl', [$acl]);
    }
public function create(User $user, array $input): void
    {
        $memory = \app('orchestra.memory')->make();

        // Bootstrap auth services, so we can use orchestra/auth package
        // configuration.
        $actions = ['Manage Orchestra', 'Manage Users'];
        $admin = \config('orchestra/foundation::roles.admin', 1);
        $roles = Role::pluck('name', 'id')->all();
        $theme = [
            'frontend' => 'default',
            'backend' => 'default',
        ];

        // Attach Administrator role to the newly created administrator.
        $user->roles()->sync([$admin]);

        // Add some basic configuration for Orchestra Platform, including
        // email configuration.
        $memory->put('site.name', $input['site_name']);
        $memory->put('site.theme', $theme);
        $memory->put('email', \config('mail'));
        $memory->put('email.from', [
            'name' => $input['site_name'],
            'address' => $input['email'],
        ]);

        // We should also create a basic ACL for Orchestra Platform, since
        // the basic roles is create using Fluent Query Builder we need
        // to manually insert the roles.
        $acl = \app('orchestra.platform.acl');

        $acl->attach($memory);
        $acl->actions()->attach($actions);
        $acl->roles()->attach(\array_values($roles));
        $acl->allow($roles[$admin], $actions);

        \event('orchestra.install: acl', [$acl]);
    }
public function create ( User $ user , array $ input ) : void { $ memory = \ app ( 'orchestra.memory' ) -> make ( ) ; // Bootstrap auth services, so we can use orchestra/auth package // configuration. $ actions = [ 'Manage Orchestra' , 'Manage Users' ] ; $ admin = \ config ( 'orchestra/foundation::roles.admin' , 1 ) ; $ roles = Role :: pluck ( 'name' , 'id' ) -> all ( ) ; $ theme = [ 'frontend' => 'default' , 'backend' => 'default' , ] ; // Attach Administrator role to the newly created administrator. $ user -> roles ( ) -> sync ( [ $ admin ] ) ; // Add some basic configuration for Orchestra Platform, including // email configuration. $ memory -> put ( 'site.name' , $ input [ 'site_name' ] ) ; $ memory -> put ( 'site.theme' , $ theme ) ; $ memory -> put ( 'email' , \ config ( 'mail' ) ) ; $ memory -> put ( 'email.from' , [ 'name' => $ input [ 'site_name' ] , 'address' => $ input [ 'email' ] , ] ) ; // We should also create a basic ACL for Orchestra Platform, since // the basic roles is create using Fluent Query Builder we need // to manually insert the roles. $ acl = \ app ( 'orchestra.platform.acl' ) ; $ acl -> attach ( $ memory ) ; $ acl -> actions ( ) -> attach ( $ actions ) ; $ acl -> roles ( ) -> attach ( \ array_values ( $ roles ) ) ; $ acl -> allow ( $ roles [ $ admin ] , $ actions ) ; \ event ( 'orchestra.install: acl' , [ $ acl ] ) ; }
Run application setup.

@param  \Orchestra\Model\User  $user
@param  array  $input

@return void
Run application setup .