database seeder insert laravel
php artisan make:seeder UsersTableSeeder<?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 < $date php
- array_unique() on value php
- clear file cache laravel
- catch get error php
- <?php ini_set('display_errors', 'On'); error_reporting(E_ALL); $finalIURL =
- "Allowed memory size of 134217728 bytes exhausted (tried to allocate 56627200 bytes)" in wamp
- fetch data from live website curl php
- find data type in php
- convert array to object php
- array count items
- Allowed memory size of 1610612736 bytes exhausted laragon
- convert a image to base64 data in php and show image
- check if a key in an array exist ph
- e error reporting all
- Allowed memory size of 1610612736 bytes exhausted
- codeigniter table list
- codeigniter base url automatic
- aget date time in php
- cache clear in larave
- disable register auth laravel
- date('h:m:i')
- apt install php7.4-mysql
- can you use return in catch php
- check for keys in array