Upgrade to Laravel 13
This commit is contained in:
parent
e8e2bff5e4
commit
9f012b01e4
117 changed files with 1878 additions and 2215 deletions
|
|
@ -4,6 +4,9 @@ namespace Database\Seeders;
|
|||
|
||||
use App\Models\Like;
|
||||
use Faker\Generator;
|
||||
use Faker\Provider\en_US\Person;
|
||||
use Faker\Provider\Internet;
|
||||
use Faker\Provider\Lorem;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
|
@ -19,9 +22,9 @@ class LikesTableSeeder extends Seeder
|
|||
|
||||
$now = Carbon::now()->subDays(rand(3, 6));
|
||||
$faker = new Generator;
|
||||
$faker->addProvider(new \Faker\Provider\en_US\Person($faker));
|
||||
$faker->addProvider(new \Faker\Provider\Lorem($faker));
|
||||
$faker->addProvider(new \Faker\Provider\Internet($faker));
|
||||
$faker->addProvider(new Person($faker));
|
||||
$faker->addProvider(new Lorem($faker));
|
||||
$faker->addProvider(new Internet($faker));
|
||||
$likeFromAuthor = Like::create([
|
||||
'url' => $faker->url,
|
||||
'author_url' => $faker->url,
|
||||
|
|
|
|||
|
|
@ -82,12 +82,12 @@ class NotesTableSeeder extends Seeder
|
|||
->update(['updated_at' => $now->toDateTimeString()]);
|
||||
|
||||
// copy aaron’s profile pic in place
|
||||
$spl = new SplFileInfo(public_path() . '/assets/profile-images/aaronparecki.com');
|
||||
$spl = new SplFileInfo(public_path().'/assets/profile-images/aaronparecki.com');
|
||||
if ($spl->isDir() === false) {
|
||||
if (! mkdir($concurrentDirectory = public_path() . '/assets/profile-images/aaronparecki.com', 0755) && ! is_dir($concurrentDirectory)) {
|
||||
if (! mkdir($concurrentDirectory = public_path().'/assets/profile-images/aaronparecki.com', 0755) && ! is_dir($concurrentDirectory)) {
|
||||
throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
|
||||
}
|
||||
copy(base_path() . '/tests/aaron.png', public_path() . '/assets/profile-images/aaronparecki.com/image');
|
||||
copy(base_path().'/tests/aaron.png', public_path().'/assets/profile-images/aaronparecki.com/image');
|
||||
}
|
||||
|
||||
$now = Carbon::now()->subDays(rand(3, 7));
|
||||
|
|
|
|||
|
|
@ -15,34 +15,34 @@ class WebMentionsTableSeeder extends Seeder
|
|||
// WebMention reply Aaron
|
||||
WebMention::create([
|
||||
'source' => 'https://aaronpk.localhost/reply/1',
|
||||
'target' => config('app.url') . '/notes/Z',
|
||||
'target' => config('app.url').'/notes/Z',
|
||||
'commentable_id' => '5',
|
||||
'commentable_type' => 'App\Models\Note',
|
||||
'type' => 'in-reply-to',
|
||||
'mf2' => '{"rels": [], "items": [{"type": ["h-entry"], "properties": {"url": ["https://aaronpk.localhost/reply/1"], "name": ["Hi too"], "author": [{"type": ["h-card"], "value": "Aaron Parecki", "properties": {"url": ["https://aaronpk.localhost"], "name": ["Aaron Parecki"], "photo": ["https://aaronparecki.com/images/profile.jpg"]}}], "content": [{"html": "Hi too", "value": "Hi too"}], "published": ["' . date(DATE_W3C) . '"], "in-reply-to": ["https://aaronpk.loclahost/reply/1", "' . config('app.url') .'/notes/E"]}}]}',
|
||||
'mf2' => '{"rels": [], "items": [{"type": ["h-entry"], "properties": {"url": ["https://aaronpk.localhost/reply/1"], "name": ["Hi too"], "author": [{"type": ["h-card"], "value": "Aaron Parecki", "properties": {"url": ["https://aaronpk.localhost"], "name": ["Aaron Parecki"], "photo": ["https://aaronparecki.com/images/profile.jpg"]}}], "content": [{"html": "Hi too", "value": "Hi too"}], "published": ["'.date(DATE_W3C).'"], "in-reply-to": ["https://aaronpk.loclahost/reply/1", "'.config('app.url').'/notes/E"]}}]}',
|
||||
]);
|
||||
// WebMention like Tantek
|
||||
WebMention::create([
|
||||
'source' => 'https://tantek.com/likes/1',
|
||||
'target' => config('app.url') . '/notes/G',
|
||||
'target' => config('app.url').'/notes/G',
|
||||
'commentable_id' => '16',
|
||||
'commentable_type' => 'App\Models\Note',
|
||||
'type' => 'like-of',
|
||||
'mf2' => '{"rels": [], "items": [{"type": ["h-entry"], "properties": {"url": ["https://tantek.com/likes/1"], "name": ["KUTGW"], "author": [{"type": ["h-card"], "value": "Tantek Celik", "properties": {"url": ["https://tantek.com/"], "name": ["Tantek Celik"], "photo": ["https://tantek.com/photo.jpg"]}}], "content": [{"html": "kutgw", "value": "kutgw"}], "published": ["' . date(DATE_W3C) . '"], "u-like-of": ["' . config('app.url') . '/notes/G"]}}]}',
|
||||
'mf2' => '{"rels": [], "items": [{"type": ["h-entry"], "properties": {"url": ["https://tantek.com/likes/1"], "name": ["KUTGW"], "author": [{"type": ["h-card"], "value": "Tantek Celik", "properties": {"url": ["https://tantek.com/"], "name": ["Tantek Celik"], "photo": ["https://tantek.com/photo.jpg"]}}], "content": [{"html": "kutgw", "value": "kutgw"}], "published": ["'.date(DATE_W3C).'"], "u-like-of": ["'.config('app.url').'/notes/G"]}}]}',
|
||||
]);
|
||||
// WebMention repost Barry
|
||||
WebMention::create([
|
||||
'source' => 'https://barryfrost.com/reposts/1',
|
||||
'target' => config('app.url') . '/notes/C',
|
||||
'target' => config('app.url').'/notes/C',
|
||||
'commentable_id' => '12',
|
||||
'commentable_type' => 'App\Models\Note',
|
||||
'type' => 'repost-of',
|
||||
'mf2' => '{"rels": [], "items": [{"type": ["h-entry"], "properties": {"url": ["https://barryfrost.com/reposts/1"], "name": ["Kagi is the best"], "author": [{"type": ["h-card"], "value": "Barry Frost", "properties": {"url": ["https://barryfrost.com/"], "name": ["Barry Frost"], "photo": ["https://barryfrost.com/barryfrost.jpg"]}}], "content": [{"html": "Kagi is the Best", "value": "Kagi is the Best"}], "published": ["' . date(DATE_W3C) . '"], "u-repost-of": ["' . config('app.url') . '/notes/C"]}}]}',
|
||||
'mf2' => '{"rels": [], "items": [{"type": ["h-entry"], "properties": {"url": ["https://barryfrost.com/reposts/1"], "name": ["Kagi is the best"], "author": [{"type": ["h-card"], "value": "Barry Frost", "properties": {"url": ["https://barryfrost.com/"], "name": ["Barry Frost"], "photo": ["https://barryfrost.com/barryfrost.jpg"]}}], "content": [{"html": "Kagi is the Best", "value": "Kagi is the Best"}], "published": ["'.date(DATE_W3C).'"], "u-repost-of": ["'.config('app.url').'/notes/C"]}}]}',
|
||||
]);
|
||||
// WebMention like from Bluesky
|
||||
WebMention::create([
|
||||
'source' => 'https://brid.gy/like/bluesky/did:plc:n3jhgiq2ykctnpgzlm6p6b25/at%253A%252F%252Fdid%253Aplc%253An3jhgiq2ykctnpgzlm6p6b25%252Fapp.bsky.feed.post%252F3lalppbcyuc2w/did%253Aplc%253Aia23nh3t37r2lydmmqsixrps',
|
||||
'target' => config('app.url') . '/notes/B',
|
||||
'target' => config('app.url').'/notes/B',
|
||||
'commentable_id' => '11',
|
||||
'commentable_type' => 'App\Models\Note',
|
||||
'type' => 'like-of',
|
||||
|
|
|
|||
Loading…
Reference in a new issue