Merge pull request #497 from jonnybarnes/develop
MTM Fix error saving syndication data
This commit is contained in:
commit
8ec738a765
2 changed files with 49 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('syndication_targets', function (Blueprint $table) {
|
||||
$table->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) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue