Add model to store syndication target data
This commit is contained in:
parent
7cd9956b92
commit
ea8395a651
5 changed files with 154 additions and 9 deletions
30
database/factories/SyndicationTargetFactory.php
Normal file
30
database/factories/SyndicationTargetFactory.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\SyndicationTarget>
|
||||
*/
|
||||
class SyndicationTargetFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'uid' => $this->faker->url,
|
||||
'name' => $this->faker->name,
|
||||
'service_name' => $this->faker->name,
|
||||
'service_url' => $this->faker->url,
|
||||
'service_photo' => $this->faker->url,
|
||||
'user_name' => $this->faker->name,
|
||||
'user_url' => $this->faker->url,
|
||||
'user_photo' => $this->faker->url,
|
||||
];
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?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::create('syndication_targets', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uid');
|
||||
$table->string('name');
|
||||
$table->string('service_name');
|
||||
$table->string('service_url');
|
||||
$table->string('service_photo');
|
||||
$table->string('user_name');
|
||||
$table->string('user_url');
|
||||
$table->string('user_photo');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('syndication_targets');
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue