Skip to content

Instantly share code, notes, and snippets.

@lepikhinb
Last active November 11, 2021 21:44
Show Gist options
  • Save lepikhinb/d8c81fced853d7ef77b386103052197c to your computer and use it in GitHub Desktop.
Save lepikhinb/d8c81fced853d7ef77b386103052197c 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