db seeder laravel 5
<?php
namespace Database\Seeders;
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 seeders.
*
* @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 NameOfTheSeeder
Also in PHP:
- To find out where your php.ini is located
- filter elementor
- Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.2.33.
- clear cach in laravel
- file_get_contents(): SSL: Network is down
- acf repeater example count
- date_format() in php
- array key exists return value
- check codeigniter version of a project
- check if key in array php
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108872 bytes) in phar://C: /ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 84
- centos search directory php.exe
- Malformed UTF-8 characters, possibly incorrectly encoded
- create new directory php
- file_put_contents php json file
- find matching substrings in a string php
- 5 code random number php
- am pm in php
- check word in string and retun string
- base64 to image
- drupal 8 entity_view
- creating a laravel project with composer
- create a new project laravel
- eventtypesseeder laravel