protected function getAdministratorRole()
    {
        $role = Admin::model('Role')->firstOrNew([
            'name' => 'admin',
        ]);

        if (!$role->exists) {
            $role->fill([
                'display_name' => 'Administrator',
            ])->save();
        }

        return $role;
    }
protected function getAdministratorRole()
    {
        $role = Admin::model('Role')->firstOrNew([
            'name' => 'admin',
        ]);

        if (!$role->exists) {
            $role->fill([
                'display_name' => 'Administrator',
            ])->save();
        }

        return $role;
    }
protected function getAdministratorRole ( ) { $ role = Admin :: model ( 'Role' ) -> firstOrNew ( [ 'name' => 'admin' , ] ) ; if ( ! $ role -> exists ) { $ role -> fill ( [ 'display_name' => 'Administrator' , ] ) -> save ( ) ; } return $ role ; }
Get the administrator role, create it if it does not exists.

@return mixed
Get the administrator role create it if it does not exists .