Allow notes to be syndicated to Mastodon

This commit is contained in:
Jonny Barnes 2022-11-04 15:23:31 +00:00
parent ffe90b9399
commit 72cb4fd7eb
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
11 changed files with 200 additions and 5 deletions

View file

@ -0,0 +1,32 @@
<?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('notes', function (Blueprint $table) {
$table->string('mastodon_url')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('notes', function (Blueprint $table) {
$table->dropColumn('mastodon_url');
});
}
};

View file

@ -137,6 +137,7 @@ class NotesTableSeeder extends Seeder
$noteSyndicated->facebook_url = 'https://www.facebook.com/post/12345789';
$noteSyndicated->swarm_url = 'https://www.swarmapp.com/checking/123456789';
$noteSyndicated->instagram_url = 'https://www.instagram.com/p/aWsEd123Jh';
$noteSyndicated->mastodon_url = 'https://mastodon.social/@jonnybarnes/123456789';
$noteSyndicated->save();
DB::table('notes')
->where('id', $noteSyndicated->id)