create seeds laravel
Try:
composer dump-autoload
php artisan config:cache
If not working also try:
php artisan migrate:refresh.<?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 UserSeederphp artisan make:seeder NameOfTheSeeder
Also in PHP:
- $_redirect() php
- d-m-Y H:i
- current date to timestamp php
- convert date and time to time stamp phph
- datetime mysql php
- find if a string contain any of a given words php
- count variable lenth in php
- data type php display
- executar comando linux php
- curl multi exec
- find if string contains any of character php
- RuntimeException: No application encryption key has been specified.
- HOW TO GET LAST INSERTED ID FROM TABLE IN SQL IN CODEIGNITER
- array_values() in php
- find array key value by check key
- associative array rev in php
- create folder using library in php
- cron.php
- Best Image Manipulation and Graphs tools for php
- contains functin php
- Malformed UTF-8 characters, possibly incorrectly encoded
- echo command in browser console
- datatype checking in php
- Y-m-d H:s:i input