Factory::defineAs()

void defineAs(string $class, string $name, callable $attributes) Define a class with a given short-name. Parameters string $class string $name callable $attributes Return Value void

Factory::define()

void define(string $class, callable $attributes, string $name = 'default') Define a class with a given set of attributes. Parameters string $class callable $attributes string $name Return Value void

Factory::decrementRender()

void decrementRender() Decrement the rendering counter. Return Value void

Factory::creator()

array creator(array|string $views, Closure|string $callback) Register a view creator event. Parameters array|string $views Closure|string $callback Return Value array

Factory::creator()

array creator(array|string $views, Closure|string $callback) Register a view creator event. Parameters array|string $views Closure|string $callback Return Value array

Factory::createAs()

mixed createAs(string $class, string $name, array $attributes = array()) Create an instance of the given model and type and persist it to the database. Parameters string $class string $name array $attributes Return Value mixed

Factory::create()

mixed create(string $class, array $attributes = array()) Create an instance of the given model and persist it to the database. Parameters string $class array $attributes Return Value mixed

Factory::construct()

static Factory construct(Generator $faker, string|null $pathToFactories = null) Create a new factory container. Parameters Generator $faker string|null $pathToFactories Return Value Factory

Factory::connection()

Queue connection(string $name = null) Resolve a queue connection instance. Parameters string $name Return Value Queue

Factory::connection()

void connection(string $name = null) Get a broadcaster implementation by name. Parameters string $name Return Value void