data seeder in laravel
php artisan make:seeder NameOfTheSeeder<?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:
- base64 decode in php
- data validation of $_POST in php
- clearview cache laravel
- PHP Warning: Version warning: Imagick was compiled against Image Magick version 1654 but version 1650 is loaded.
- Tto upper php
- Decode from Base64 format php
- acf looping through post types
- currunt date time in php
- combine date time php
- #1146 - Table 'phplessons.super' doesn't exist
- dump all variables twig
- find if a string contain any of a given words php
- create seede for table in laravel
- composer takes older version of php
- display date and hour php
- disable registration in laravel authentication
- all php exception
- codeigniter id of last insert
- Class 'Pusher' not found
- check if word in string
- date format php from string
- When you click on the search button, it is moved to the page laravel
- array key search php
- carbon random future date