create new seeder laravel
#All of them
php artisan db:seed
#One class
php artisan db:seed --class=UserSeederphp artisan db:seed --class=UserSeederphp artisan make:seeder NameOfTheSeederphp artisan make:seeder UserSeederphp artisan migrate:fresh --seed<?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:
- db seed laravel cmd
- divided by 3 php
- ddev laravel setup
- check if in array key php
- TEXT UPPER PHP
- check if string include char php
- display errors on
- Your Composer dependencies require a PHP version ">= 7.2.5". You are running 7.2.0. in
- filer validation in laravel
- current data in php
- create database backup programmatically php
- array_search
- delete register option laravel 7
- build laravel project
- cusatom time format to timestamp php
- codeigniter get num_rows
- date("Y/m/d h:i:s") php
- ajax jquery php
- check lenght phph
- Laravel image validation example
- exit and echo php
- '%r%i timeformat php
- echo fread($myfile,filesize("webdictionary.txt"));
- change php version ubuntu