Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to use sseders in laravel

<?php

use IlluminateDatabaseSeeder;
use IlluminateDatabaseEloquentModel;

class MoviesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        AppMovie::create([
            'name' => 'A New Hope',
            'year' => '1977'
        ]);

        AppMovie::create([
            'name' => 'The Empire Strikes Back',
            'year' => '1980'
        ]);
    }
}
Source by riptutorial.com #
 
PREVIOUS NEXT
Tagged: #sseders #laravel
ADD COMMENT
Topic
Name
4+5 =