Skip to content

Instantly share code, notes, and snippets.

@leMaur
Forked from lepikhinb/factory.stub
Created August 19, 2021 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leMaur/027f8e0fc2285c4558c588dfca149887 to your computer and use it in GitHub Desktop.
Save leMaur/027f8e0fc2285c4558c588dfca149887 to your computer and use it in GitHub Desktop.
<?php
namespace {{ factoryNamespace }};
use Illuminate\Database\Eloquent\Factories\Factory;
use {{ namespacedModel }};
/**
* @method {{ model }}|\Illuminate\Support\Collection<{{ model }}> create($attributes = [], ?Model $parent = null)
* @method \Illuminate\Support\Collection<{{ model }}> createMany(iterable $records)
* @method {{ model }} createOne($attributes = [])
* @method {{ model }}|\Illuminate\Support\Collection<{{ model }}> make($attributes = [], ?Model $parent = null)
* @method {{ model }} makeOne($attributes = [])
*/
class {{ factory }}Factory extends Factory
{
protected $model = {{ model }}::class;
public function definition()
{
return [
//
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment