database/seeds/TagSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $tags = [
            'Technology',
            'Business',
            'Cinema',
            'Geography',
            'Videogame',
            'Math',
            'Travel',
            'Animal',
        ];
        foreach ($tags as $tag) {
            $newTag = new Tag();
            $newTag->name = $tag;
            $newTag->save();
        }
    }
public function run ( ) { $ tags = [ 'Technology' , 'Business' , 'Cinema' , 'Geography' , 'Videogame' , 'Math' , 'Travel' , 'Animal' , ] ; foreach ( $ tags as $ tag ) { $ newTag = new Tag ( ) ; $ newTag -> name = $ tag ; $ newTag -> save ( ) ; } }
Run the database seeds.
Run the database seeds .