%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/o91-api/database/factories/
Upload File :
Create Path :
Current File : /var/www/html/o91-api/database/factories/UserFactory.php

<?php

use Faker\Generator as Faker;

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/

$factory->define(App\Models\User::class, function(Faker $faker) {
    return [
        'name'         => $faker->name,
        'surname'      => $faker->lastName,
        'email'        => $faker->unique()->safeEmail,
        'is_confirmed' => true,
        'password'     => 'password',
    ];
});

$factory->define(App\Models\UserApplication::class, function(Faker $faker) {
    return [
        'name'              => $faker->name,
        'surname'           => $faker->lastName,
        'phone'             => $faker->phoneNumber,
        'email'             => $faker->unique()->safeEmail,
        'short_description' => $faker->sentence,
    ];
});

Zerion Mini Shell 1.0