for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace GiveBlood\Support\Database;
use Illuminate\Database\Eloquent\Factory;
use Faker\Generator;
/**
* Class ModelFactory
*/
abstract class ModelFactory
{
* @var string
protected $model;
* @var Factory
protected $factory;
* @var Generator
protected $faker;
* ModelFactory construct
public function __construct()
$this->factory = app()->make(Factory::class);
$this->faker = app()->make(Generator::class);
}
*
public function define()
$this->factory->define(
$this->model, function () {
return $this->fields();
);
* @return array
abstract protected function fields();