Commit bab729aa7e1b115a480dc896d41f894966c732ae

Authored by Chris Bellas
1 parent 25df08e6ca

Reverted UserFactory file for correct autoloading, updated README for the correc…

…t composer docker version

Showing 2 changed files with 29 additions and 1 deletions

... ... @@ -4,7 +4,7 @@
4 4 ```
5 5 cd api
6 6 cp .env-example .env
7   -docker run --rm -v $(pwd):/app composer install
  7 +docker run --rm -v $(pwd):/app composer:2.0.7 install
8 8 cd ..
9 9 ./create_volumes.sh
10 10 docker-compose up
api/database/factories/UserFactory.php View file @ bab729a
  1 +<?php
  2 +
  3 +/** @var \Illuminate\Database\Eloquent\Factory $factory */
  4 +
  5 +use App\User;
  6 +use Faker\Generator as Faker;
  7 +use Illuminate\Support\Str;
  8 +
  9 +/*
  10 +|--------------------------------------------------------------------------
  11 +| Model Factories
  12 +|--------------------------------------------------------------------------
  13 +|
  14 +| This directory should contain each of the model factory definitions for
  15 +| your application. Factories provide a convenient way to generate new
  16 +| model instances for testing / seeding your application's database.
  17 +|
  18 +*/
  19 +
  20 +$factory->define(User::class, function (Faker $faker) {
  21 + return [
  22 + 'name' => $faker->name,
  23 + 'email' => $faker->unique()->safeEmail,
  24 + 'email_verified_at' => now(),
  25 + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
  26 + 'remember_token' => Str::random(10),
  27 + ];
  28 +});