PHP code example of mbezhanov / laravel-faker-provider-collection

1. Go to this page and download the library: Download mbezhanov/laravel-faker-provider-collection library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mbezhanov / laravel-faker-provider-collection example snippets


return [
    // other provider definitions
    Bezhanov\Faker\Laravel\FakerServiceProvider::class,
];



namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

class StudentFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'university' => fake()->university,
            'sport' => fake()->sport,
            'team' => fake()->team,
        ];
    }
}