factory laravel seeder
php artisan db:seed --class=UserSeeder<?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('users')->insert([
'name' => Str::random(10),
'email' => Str::random(10).'@gmail.com',
'password' => Hash::make('password'),
]);
}
}
Also in PHP:
- date php français
- SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long
- date() php getting out
- check if substr exist php
- convert byte to megabyte php
- explode in php
- file_get_contents(http://cnh.local/dsc/uploads/1359e1e4c0a10294d9894146beb3e1e9.crt): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in file /opt/gitco/cnh_laravel/app/Repositories/CallRepository.php
- clear cache routes laravel
- artisan show routes
- drupal 8 user_load
- exceptions (throwing | catching) in php
- autocomplete new-password php
- error showing in php
- extend php maximum execution time
- encode image to base64
- check string exist in php
- Return the union of this RDD and another one
- code cache laravel
- carbon compare same date
- date fonction php
- array size php
- current URL without url site laravel
- SQLSTATE[42000]: Syntax error or access violation: 1071 laravel
- create user laravel seeder