Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

insert data using seeder in laravel

use IlluminateSupportFacadesDB;
use IlluminateSupportFacadesHash;
...
...
DB::table('users')->insert([
    'name' => 'John Doe',
    'email' => 'john@doe.com',
    'password' => Hash::make('password')
]);
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #insert #data #seeder #laravel
ADD COMMENT
Topic
Name
4+9 =