boolean('access_oAuth')->default(true)->comment('Perform oAuth Request and get user profile'); $table->boolean('access_api')->default(true)->comment('App can Access the API, perform requests as user'); $table->boolean('access_update_apps')->default(false)->comment("App can update App Data from all Apps the User has Access to"); $table->boolean('access_update_profile')->default(false)->comment("App can Update the Profile Settings of the User"); $table->boolean('access_update_access')->default(false)->comment("App can Update the User-Access to all Apps"); $table->boolean('access_read_access')->default(false)->comment("App cann see which Apps the User give Access to"); $table->boolean('access_read_apps')->default(false)->comment("App can see which App are managed by the User"); $table->boolean('access_read_profile')->default(true)->comment("App can read the Profile Settings of the User"); }); $app = \App\Models\App::query()->where("name", "=", "PHP-GUI")->firstOrFail(); $app->access_update_apps = true; $app->access_update_profile = true; $app->access_update_access = true; $app->access_read_apps = true; $app->saveOrFail(); $setting = new \App\Models\Setting(); $setting->name = "gui_url"; $setting->description = "GUI Url for redirect User from API/PHP-GUI to WebGui"; $setting->typ = "textinput"; $setting->value = "http://localhost:8080"; $setting->saveOrFail(); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('apps', function (Blueprint $table) { $table->dropColumn('access_oAuth'); $table->dropColumn('access_api'); $table->dropColumn('access_update_apps'); $table->dropColumn('access_update_profile'); $table->dropColumn('access_update_access'); $table->dropColumn('access_read_access'); $table->dropColumn('access_read_apps'); $table->dropColumn('access_read_profile'); }); \App\Models\Setting::query()->where("name", "=", "gui_url")->delete(); } }