diff --git a/app/Http/Controllers/Admin/SyndicationTargetsController.php b/app/Http/Controllers/Admin/SyndicationTargetsController.php index f8c93260..c71140ee 100644 --- a/app/Http/Controllers/Admin/SyndicationTargetsController.php +++ b/app/Http/Controllers/Admin/SyndicationTargetsController.php @@ -45,6 +45,12 @@ class SyndicationTargetsController extends Controller $validated = $request->validate([ 'uid' => 'required|string', 'name' => 'required|string', + 'service_name' => 'nullable|string', + 'service_url' => 'nullable|string', + 'service_photo' => 'nullable|string', + 'user_name' => 'nullable|string', + 'user_url' => 'nullable|string', + 'user_photo' => 'nullable|string', ]); SyndicationTarget::create($validated); @@ -77,6 +83,12 @@ class SyndicationTargetsController extends Controller $validated = $request->validate([ 'uid' => 'required|string', 'name' => 'required|string', + 'service_name' => 'nullable|string', + 'service_url' => 'nullable|string', + 'service_photo' => 'nullable|string', + 'user_name' => 'nullable|string', + 'user_url' => 'nullable|string', + 'user_photo' => 'nullable|string', ]); $syndicationTarget->update($validated); diff --git a/database/migrations/2022_10_24_160127_make_some_syndication_data_optional.php b/database/migrations/2022_10_24_160127_make_some_syndication_data_optional.php new file mode 100644 index 00000000..901305a2 --- /dev/null +++ b/database/migrations/2022_10_24_160127_make_some_syndication_data_optional.php @@ -0,0 +1,37 @@ +string('service_name')->nullable()->change(); + $table->string('service_url')->nullable()->change(); + $table->string('service_photo')->nullable()->change(); + $table->string('user_name')->nullable()->change(); + $table->string('user_url')->nullable()->change(); + $table->string('user_photo')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('syndication_targets', function (Blueprint $table) { + // + }); + } +};