Development
Generate Plugin Command
Generate the given console command for the specified plugin.
fresns make:command CreateDemoCommand
Generate Plugin Migration
Generate a migration for specified plugin.
fresns make:migration create_demos_table
Generate Plugin Seed
Generate the given seed name for the specified plugin.
fresns make:seed seed_fake_demos
Generate Plugin Factory
Generate the given database factory for the specified plugin.
fresns make:factory FactoryName
Generate Plugin Provider
Generate the given service provider name for the specified plugin.
fresns make:provider DemoServiceProvider
Generate Plugin Controller
Generate a controller for the specified plugin.
fresns make:controller PostsController
Generate Plugin Model
Generate the given model for the specified plugin.
fresns make:model Post
Optional 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 CanReadPostsMiddleware
Generate Plugin DTO
Generate a DTO(data transfer object) for specified plugin.
fresns make:dto VerifySignDTO
Generate Plugin Mail
Generate the given mail class for the specified plugin.
fresns make:mail SendWeeklyPostsEmail
Generate Plugin Notification
Generate the given notification class name for the specified plugin.
fresns make:notification NotificationAdminOfNewComment
Generate 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 --queued
Generate Plugin Request
Generate the given request for the specified plugin.
fresns make:request CreatePostRequest
Generate Plugin Event
Generate the given event for the specified plugin.
fresns make:event BlogPostWasUpdated
Generate Plugin Job
Generate the given job for the specified plugin.
fresns make:job JobName
//A synchronous job class
fresns make:job JobName --sync
Generate 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 PolicyName
Generate 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 ValidationRule
Generate 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 --collection
Generate Plugin Test
Generate the given test class for the specified plugin.
fresns make:test EloquentPostRepositoryTest
Generate Plugin Schedule Provider
Generate a console service provider for specified plugin.
fresns make:console-provider
Generate Plugin Event Provider
Generate a event provider for specified plugin.
fresns make:event-provider
- You need to add it yourself to the
providers
parameter 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
providers
parameter ofplugin.json
.
Generate Plugin Exception Provider
Generate a exception provider for specified plugin.
fresns make:exception-provider
Generate 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
providers
parameter ofplugin.json
.