Skip to content

Commit

Permalink
Add tags seeder
Browse files Browse the repository at this point in the history
  • Loading branch information
techenby committed May 14, 2024
1 parent d00e20b commit 072ded8
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
2 changes: 2 additions & 0 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ public function run(): void
'name' => 'Test User',
'email' => '[email protected]',
]);

$this->call(TagsSeeder::class);
}
}
111 changes: 111 additions & 0 deletions database/seeders/TagsSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Spatie\Tags\Tag;

class TagsSeeder extends Seeder
{
public $list = [
'API Resources',
'Artisan Console',
'Asset Bundling',
'Authentication',
'Authorization',
'Blade Templates',
'Breeze',
'Broadcasting',
'Browser Tests',
'Cache',
'Cashier',
'Collections',
'Collections',
'Console Tests',
'Context',
'Contracts',
'Controllers',
'CSRF Protection',
'Database Tests',
'Deployment',
'Dusk',
'Echo',
'Email Verification',
'Encryption',
'Envoy',
'Envoyer',
'Error Handling',
'Events',
'Facades',
'Factories',
'File Storage',
'Folio',
'Forge',
'Fortify',
'Hashing',
'Helpers',
'Herd',
'Homestead',
'Horizon',
'HTTP Client',
'HTTP Tests',
'Inertia',
'Jetstream',
'Livewire',
'Localization',
'Logging',
'Mail',
'Middleware',
'Migrations',
'Mix',
'Mocking',
'Mutators / Casts',
'Notifications',
'Nova',
'Octane',
'Package Development',
'Pagination',
'Passport',
'Password Reset',
'Pennant',
'Pint',
'Precognition',
'Processes',
'Prompts',
'Pulse',
'Query Builder',
'Queues',
'Rate Limiting',
'Redis',
'Relationships',
'Request Lifecycle',
'Requests',
'Responses',
'Reverb',
'Routing',
'Sail',
'Sanctum',
'Scout',
'Seeding',
'Serialization',
'Service Container',
'Service Providers',
'Session',
'Socialite',
'Spark',
'Strings',
'Task Scheduling',
'Telescope',
'URL Generation',
'Valet',
'Validation',
'Vapor',
'Views',
];

public function run(): void
{
Tag::findOrCreate($this->list);
}
}

0 comments on commit 072ded8

Please sign in to comment.