13 March, 2019
Factories in a plugin

To enable ability to write factories in your plugin add this to the Plugin class:

use Illuminate\Database\Eloquent\Factory as EloquentFactory;

public function register()
{
    app(EloquentFactory::class)->load(plugins_path('author/plugin/factories'));
}
view_count: 30