create user laravel seeder
<?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'),
]);
}
}php artisan make:seeder NameOfTheSeederphp artisan make:model MODEL_PATH\MODEL_NAME -mcrs
or
php artisan make:model MODEL_PATH\MODEL_NAME -a
-a, --all Generate a migration, factory, and resource controller for the model
-m, --migration Create a new migration file for the model.
-c, --controller Create a new controller for the model.
-r, --resource Indicates if the generated controller should be a resource controller
-s, --seeder Create a new seeder file for the model.
Also in PHP:
- exit and echo php
- cache and compile file clear laravel
- clear cahce laravel
- catch multiple exception php
- case upper php
- check datatype of variable in php
- PHP message: PHP Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Eav\Model\Attribute\Data\Text::validateLength() must be of the type string, null given
- cache laravel example
- display date time in php
- SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
- error enable in php
- Error message: Allowed memory size of bytes exhausted wordpress
- advanced custom field repeater
- count letters in php
- fetch value from json link in php
- date in php in dats
- Call to a member function diffForHumans() on string in
- codeigniter id of last insert
- all php error report
- cacert file_get_contents openssl
- advantages of php
- debug native php
- cakephp extract array
- express get current url