Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

onlyu-bot/test-factory

Repository files navigation

Use the route to create:

/factory/{product_number}/{info_number}

  • First it shows the output of Tests\Factories\ProductFactory::create();
  • Then it shows the output of Product::with('info')->get();
    • fix the issue of products data generate twice amount of the ProductFactory.

Use the route to refresh database:

/refresh

Files modified after installing laravel and composer

  • .env
  • app/Models/*
  • config/database.php
  • config/factories-reloaded.php
  • database/factories/*
  • database/migrations/*
  • database/sqlites/*
  • resources/views/factory.blade.php
  • routes/web.php
  • tests/Factories/*

About the app

Laravel 7.20.0

sqlite

  • files store in the /database/sqlites folder

coderello/laravel-populated-factory

  • use it to generate /database/factories/ProductFactories.php from /database/migrations/create_products_table.php
  • with a modified generator PR #17
  • command ex: php artisan make:populated-factory Models\\Product

christophrumpel/laravel-factories-reloaded

  • use it to generate /tests/Factories/ProductFactory.php from /database/factories/ProductFactories.php
  • command: php artisan make:factory-reloaded

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages