Development
Generate Plugin Command
Generate the given console command for the specified plugin.
fresns make:command CreateDemoCommandGenerate Plugin Migration
Generate a migration for specified plugin.
fresns make:migration create_demos_tableGenerate Plugin Seed
Generate the given seed name for the specified plugin.
fresns make:seed seed_fake_demosGenerate Plugin Factory
Generate the given database factory for the specified plugin.
fresns make:factory FactoryNameGenerate Plugin Provider
Generate the given service provider name for the specified plugin.
fresns make:provider DemoServiceProviderGenerate Plugin Controller
Generate a controller for the specified plugin.
fresns make:controller PostsControllerGenerate Plugin Model
Generate the given model for the specified plugin.
fresns make:model PostOptional options:
--fillable=field1,field2: set the fillable fields on the generated model--migration,-m: create the migration file for the given model
Generate Plugin Middleware
Generate the given middleware name for the specified plugin.
fresns make:middleware CanReadPostsMiddlewareGenerate Plugin DTO
Generate a DTO(data transfer object) for specified plugin.
fresns make:dto VerifySignDTOGenerate Plugin Mail
Generate the given mail class for the specified plugin.
fresns make:mail SendWeeklyPostsEmailGenerate Plugin Notification
Generate the given notification class name for the specified plugin.
fresns make:notification NotificationAdminOfNewCommentGenerate Plugin Listener
Generate the given listener for the specified plugin. Optionally you can specify which event class it should listen to. It also accepts a --queued flag allowed queued event listeners.
fresns make:listener NotificationUsersOfANewPost
fresns make:listener NotificationUsersOfANewPost --event=PostWasCreated
fresns make:listener NotificationUsersOfANewPost --event=PostWasCreated --queuedGenerate Plugin Request
Generate the given request for the specified plugin.
fresns make:request CreatePostRequestGenerate Plugin Event
Generate the given event for the specified plugin.
fresns make:event BlogPostWasUpdatedGenerate Plugin Job
Generate the given job for the specified plugin.
fresns make:job JobName
//A synchronous job class
fresns make:job JobName --syncGenerate Plugin Policy
Generate the given policy class for the specified plugin.
The Policies is not generated by default when creating a new plugin. Change the value of paths.generator.policies in plugins.php to your desired location.
fresns make:policy PolicyNameGenerate Plugin Rule
Generate the given validation rule class for the specified plugin.
The Rules folder is not generated by default when creating a new plugin. Change the value of paths.generator.rules in plugins.php to your desired location.
fresns make:rule ValidationRuleGenerate Plugin Resource
Generate the given resource class for the specified plugin. It can have an optional --collection argument to generate a resource collection.
The Transformers folder is not generated by default when creating a new plugin. Change the value of paths.generator.resource in plugins.php to your desired location.
fresns make:resource PostResource
fresns make:resource PostResource --collectionGenerate Plugin Test
Generate the given test class for the specified plugin.
fresns make:test EloquentPostRepositoryTestGenerate Plugin Schedule Provider
Generate a console service provider for specified plugin.
fresns make:console-providerGenerate Plugin Event Provider
Generate a event provider for specified plugin.
fresns make:event-provider- You need to add it yourself to the
providersparameter ofplugin.json.
Generate Plugin SQL Provider
Generate a sql provider for specified plugin.
fresns make:sql-provider- You need to add it yourself to the
providersparameter ofplugin.json.
Generate Plugin Exception Provider
Generate a exception provider for specified plugin.
fresns make:exception-providerGenerate Plugin Command Word Provider
Generate a cmd word service provider for specified plugin.
fresns make:cmdword-provider- You need to add it yourself to the
providersparameter ofplugin.json.