From 61189eeed8be852dbf9f0274ba28ff8b7504193b Mon Sep 17 00:00:00 2001 From: Jevan Tang <22316055+jevantang@users.noreply.github.com> Date: Mon, 29 Apr 2024 05:57:37 +0800 Subject: [PATCH] docs: markdown syntax markup --- docs/artisan/control.md | 44 ++++---- docs/artisan/create.md | 6 +- docs/artisan/development.md | 48 ++++----- docs/artisan/index.md | 122 +++++++++++------------ docs/artisan/management.md | 8 +- docs/artisan/started.md | 10 +- docs/command-word/development.md | 2 +- docs/dto/index.md | 6 +- docs/guide/installation.md | 4 +- docs/zh-Hans/artisan/control.md | 44 ++++---- docs/zh-Hans/artisan/create.md | 6 +- docs/zh-Hans/artisan/development.md | 48 ++++----- docs/zh-Hans/artisan/index.md | 122 +++++++++++------------ docs/zh-Hans/artisan/management.md | 8 +- docs/zh-Hans/artisan/started.md | 10 +- docs/zh-Hans/command-word/development.md | 2 +- docs/zh-Hans/dto/index.md | 4 +- 17 files changed, 247 insertions(+), 247 deletions(-) diff --git a/docs/artisan/control.md b/docs/artisan/control.md index 4148e79..45463e9 100644 --- a/docs/artisan/control.md +++ b/docs/artisan/control.md @@ -4,13 +4,13 @@ Unzip the plugin files into the `/plugins/` directory, the final directory will be `/plugins/{fskey}/`. -```php +```sh fresns plugin:unzip /www/wwwroot/fresns/storage/plugins/downloads/123e4567-e89b-12d3-a456-426614174000.zip ``` or -```php +```sh php artisan plugin:unzip /www/wwwroot/fresns/storage/plugins/downloads/123e4567-e89b-12d3-a456-426614174000.zip ``` @@ -18,13 +18,13 @@ php artisan plugin:unzip /www/wwwroot/fresns/storage/plugins/downloads/123e4567- Publish static resources for the plugin `DemoPlugin`. -```php +```sh fresns plugin:publish ``` or -```php +```sh php artisan plugin:publish DemoPlugin ``` @@ -34,13 +34,13 @@ php artisan plugin:publish DemoPlugin Unpublish static resources for the plugin `DemoPlugin`. -```php +```sh fresns plugin:unpublish ``` or -```php +```sh php artisan plugin:unpublish DemoPlugin ``` @@ -50,13 +50,13 @@ php artisan plugin:unpublish DemoPlugin Composer all plugins. -```php +```sh fresns plugin:composer-update ``` or -```php +```sh php artisan plugin:composer-update ``` @@ -64,13 +64,13 @@ php artisan plugin:composer-update Migrate the given plugin, or without a plugin an argument, migrate all plugins. -```php +```sh fresns plugin:migrate ``` or -```php +```sh php artisan plugin:migrate DemoPlugin ``` @@ -78,13 +78,13 @@ php artisan plugin:migrate DemoPlugin Rollback the given plugin, or without an argument, rollback all plugins. -```php +```sh fresns plugin:migrate-rollback ``` or -```php +```sh php artisan plugin:migrate-rollback DemoPlugin ``` @@ -92,13 +92,13 @@ php artisan plugin:migrate-rollback DemoPlugin Refresh the migration for the given plugin, or without a specified plugin refresh all plugins migrations. -```php +```sh fresns plugin:migrate-refresh ``` or -```php +```sh php artisan plugin:migrate-refresh DemoPlugin ``` @@ -106,13 +106,13 @@ php artisan plugin:migrate-refresh DemoPlugin Reset the migration for the given plugin, or without a specified plugin reset all plugins migrations. -```php +```sh fresns plugin:migrate-reset ``` or -```php +```sh php artisan plugin:migrate-reset DemoPlugin ``` @@ -120,13 +120,13 @@ php artisan plugin:migrate-reset DemoPlugin Seed the given plugin, or without an argument, seed all plugins. -```php +```sh fresns plugin:seed ``` or -```php +```sh php artisan plugin:seed DemoPlugin ``` @@ -134,13 +134,13 @@ php artisan plugin:seed DemoPlugin Execute the `plugin:unzip`、`plugin:composer-update`、`plugin:migrate`、`plugin:publish` commands in that order. -```php +```sh fresns plugin:install /www/wwwroot/fresns/storage/plugins/123e4567-e89b-12d3-a456-426614174000.zip ``` or -```php +```sh php artisan plugin:install /www/wwwroot/fresns/storage/plugins/123e4567-e89b-12d3-a456-426614174000.zip ``` @@ -148,14 +148,14 @@ php artisan plugin:install /www/wwwroot/fresns/storage/plugins/123e4567-e89b-12d Uninstall the plugin and select whether you want to clean the data of the plugin. -```php +```sh fresns plugin:uninstall --cleardata=true fresns plugin:uninstall --cleardata=false ``` or -```php +```sh php artisan plugin:uninstall DemoPlugin --cleardata=true php artisan plugin:uninstall DemoPlugin --cleardata=false ``` diff --git a/docs/artisan/create.md b/docs/artisan/create.md index 2010c4a..8942257 100644 --- a/docs/artisan/create.md +++ b/docs/artisan/create.md @@ -2,11 +2,11 @@ Create a plugin with fskey as `DemoPlugin` -```php +```sh fresns plugin:make DemoPlugin ``` or -```php - fresns new DemoPlugin +```sh +fresns new DemoPlugin ``` diff --git a/docs/artisan/development.md b/docs/artisan/development.md index 950dfc7..ed96afb 100644 --- a/docs/artisan/development.md +++ b/docs/artisan/development.md @@ -4,7 +4,7 @@ Generate the given console command for the specified plugin. -```php +```sh fresns make:command CreateDemoCommand ``` @@ -12,7 +12,7 @@ fresns make:command CreateDemoCommand Generate a migration for specified plugin. -```php +```sh fresns make:migration create_demos_table ``` @@ -20,7 +20,7 @@ fresns make:migration create_demos_table Generate the given seed name for the specified plugin. -```php +```sh fresns make:seed seed_fake_demos ``` @@ -28,7 +28,7 @@ fresns make:seed seed_fake_demos Generate the given database factory for the specified plugin. -```php +```sh fresns make:factory FactoryName ``` @@ -36,7 +36,7 @@ fresns make:factory FactoryName Generate the given service provider name for the specified plugin. -```php +```sh fresns make:provider DemoServiceProvider ``` @@ -44,7 +44,7 @@ fresns make:provider DemoServiceProvider Generate a controller for the specified plugin. -```php +```sh fresns make:controller PostsController ``` @@ -52,7 +52,7 @@ fresns make:controller PostsController Generate the given model for the specified plugin. -```php +```sh fresns make:model Post ``` @@ -65,7 +65,7 @@ Optional options: Generate the given middleware name for the specified plugin. -```php +```sh fresns make:middleware CanReadPostsMiddleware ``` @@ -73,7 +73,7 @@ fresns make:middleware CanReadPostsMiddleware Generate a [DTO(data transfer object)](../dto/) for specified plugin. -```php +```sh fresns make:dto VerifySignDTO ``` @@ -81,7 +81,7 @@ fresns make:dto VerifySignDTO Generate the given mail class for the specified plugin. -```php +```sh fresns make:mail SendWeeklyPostsEmail ``` @@ -89,7 +89,7 @@ fresns make:mail SendWeeklyPostsEmail Generate the given notification class name for the specified plugin. -```php +```sh fresns make:notification NotificationAdminOfNewComment ``` @@ -97,7 +97,7 @@ fresns make:notification NotificationAdminOfNewComment 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. -```php +```sh fresns make:listener NotificationUsersOfANewPost fresns make:listener NotificationUsersOfANewPost --event=PostWasCreated @@ -109,7 +109,7 @@ fresns make:listener NotificationUsersOfANewPost --event=PostWasCreated --queued Generate the given request for the specified plugin. -```php +```sh fresns make:request CreatePostRequest ``` @@ -117,7 +117,7 @@ fresns make:request CreatePostRequest Generate the given event for the specified plugin. -```php +```sh fresns make:event BlogPostWasUpdated ``` @@ -125,7 +125,7 @@ fresns make:event BlogPostWasUpdated Generate the given job for the specified plugin. -```php +```sh fresns make:job JobName //A synchronous job class @@ -138,7 +138,7 @@ 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. -```php +```sh fresns make:policy PolicyName ``` @@ -148,7 +148,7 @@ 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. -```php +```sh fresns make:rule ValidationRule ``` @@ -158,7 +158,7 @@ Generate the given resource class for the specified plugin. It can have an optio 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. -```php +```sh fresns make:resource PostResource fresns make:resource PostResource --collection @@ -168,7 +168,7 @@ fresns make:resource PostResource --collection Generate the given test class for the specified plugin. -```php +```sh fresns make:test EloquentPostRepositoryTest ``` @@ -176,7 +176,7 @@ fresns make:test EloquentPostRepositoryTest Generate a console service provider for specified plugin. -```php +```sh fresns make:console-provider ``` @@ -184,7 +184,7 @@ fresns make:console-provider Generate a event provider for specified plugin. -```php +```sh fresns make:event-provider ``` @@ -194,7 +194,7 @@ fresns make:event-provider Generate a sql provider for specified plugin. -```php +```sh fresns make:sql-provider ``` @@ -204,7 +204,7 @@ fresns make:sql-provider Generate a exception provider for specified plugin. -```php +```sh fresns make:exception-provider ``` @@ -212,7 +212,7 @@ fresns make:exception-provider Generate a [cmd word service provider](../command-word/) for specified plugin. -```php +```sh fresns make:cmdword-provider ``` diff --git a/docs/artisan/index.md b/docs/artisan/index.md index 092c7cb..9024bbe 100644 --- a/docs/artisan/index.md +++ b/docs/artisan/index.md @@ -2,90 +2,90 @@ ## Usage -```php -php artisan fresns // Enter Plugin Development Mode +```sh +php artisan fresns # Enter Plugin Development Mode -fresns plugin // View All Commands -fresns plugin:list // View All Installed Plugins -fresns new // Generate A New Plugin -fresns enter // Go to plugin directory -fresns back // Back to the fresns root directory +fresns plugin # View All Commands +fresns plugin:list # View All Installed Plugins +fresns new # Generate A New Plugin +fresns enter # Go to plugin directory +fresns back # Back to the fresns root directory ``` ## Development -```php -fresns make:command // Generate Plugin Command -fresns make:migration // Generate Plugin Migration -fresns make:seed // Generate Plugin Seed -fresns make:factory // Generate Plugin Factory -fresns make:provider // Generate Plugin Provider -fresns make:controller // Generate Plugin Controller -fresns make:model // Generate Plugin Model -fresns make:middleware // Generate Plugin Middleware -fresns make:dto // Generate Plugin DTO (fresns/dto) -fresns make:mail // Generate Plugin Mail -fresns make:notification // Generate Plugin Notification -fresns make:listener // Generate Plugin Listener -fresns make:request // Generate Plugin Request -fresns make:event // Generate Plugin Event -fresns make:job // Generate Plugin Job -fresns make:policy // Generate Plugin Policy -fresns make:rule // Generate Plugin Rule -fresns make:resource // Generate Plugin Resource -fresns make:test // Generate Plugin Test -fresns make:schedule-provider // Generate Plugin Schedule Provider -fresns make:event-provider // Generate Plugin Event Provider -fresns make:sql-provider // Generate Plugin SQL Provider -fresns make:cmdword-provider // Generate Plugin Command Word Provider (fresns/cmd-word-manager) +```sh +fresns make:command # Generate Plugin Command +fresns make:migration # Generate Plugin Migration +fresns make:seed # Generate Plugin Seed +fresns make:factory # Generate Plugin Factory +fresns make:provider # Generate Plugin Provider +fresns make:controller # Generate Plugin Controller +fresns make:model # Generate Plugin Model +fresns make:middleware # Generate Plugin Middleware +fresns make:dto # Generate Plugin DTO (fresns/dto) +fresns make:mail # Generate Plugin Mail +fresns make:notification # Generate Plugin Notification +fresns make:listener # Generate Plugin Listener +fresns make:request # Generate Plugin Request +fresns make:event # Generate Plugin Event +fresns make:job # Generate Plugin Job +fresns make:policy # Generate Plugin Policy +fresns make:rule # Generate Plugin Rule +fresns make:resource # Generate Plugin Resource +fresns make:test # Generate Plugin Test +fresns make:schedule-provider # Generate Plugin Schedule Provider +fresns make:event-provider # Generate Plugin Event Provider +fresns make:sql-provider # Generate Plugin SQL Provider +fresns make:cmdword-provider # Generate Plugin Command Word Provider (fresns/cmd-word-manager) ``` ## Control ### fresns mode -```php -fresns plugin:unzip // Unzip the plugin package to the plugin directory: /plugins/{fskey}/ -fresns plugin:publish // Publish Plugin (static resources): /public/assets/{fskey}/ -fresns plugin:unpublish // Unpublish (remove static resources) -fresns plugin:composer-update // Update Plugin Composer Package -fresns plugin:migrate // Run Plugin Migrate -fresns plugin:migrate-rollback // Rollback Plugin Migrate -fresns plugin:migrate-refresh // Refresh Plugin Migrate -fresns plugin:migrate-reset // Reset Plugin Migrate -fresns plugin:seed // Run Plugin Seed -fresns plugin:install // Install Plugin (Run the unzip/publish/composer-update/migrate command in sequence) -fresns plugin:uninstall // Uninstall Plugin +```sh +fresns plugin:unzip # Unzip the plugin package to the plugin directory: /plugins/{fskey}/ +fresns plugin:publish # Publish Plugin (static resources): /public/assets/{fskey}/ +fresns plugin:unpublish # Unpublish (remove static resources) +fresns plugin:composer-update # Update Plugin Composer Package +fresns plugin:migrate # Run Plugin Migrate +fresns plugin:migrate-rollback # Rollback Plugin Migrate +fresns plugin:migrate-refresh # Refresh Plugin Migrate +fresns plugin:migrate-reset # Reset Plugin Migrate +fresns plugin:seed # Run Plugin Seed +fresns plugin:install # Install Plugin (Run the unzip/publish/composer-update/migrate command in sequence) +fresns plugin:uninstall # Uninstall Plugin ``` ### artisan mode -```php -php artisan plugin:unzip // Unzip the plugin package to the plugin directory: /plugins/{fskey}/ -php artisan plugin:publish // Publish Plugin (static resources): /public/assets/{fskey}/ -php artisan plugin:unpublish // Unpublish (remove static resources) -php artisan plugin:composer-update // Update Plugin Composer Package -php artisan plugin:migrate // Run Plugin Migrate -php artisan plugin:migrate-rollback // Rollback Plugin Migrate -php artisan plugin:migrate-refresh // Refresh Plugin Migrate -php artisan plugin:migrate-reset // Reset Plugin Migrate -php artisan plugin:seed // Run Plugin Seed -php artisan plugin:install // Install Plugin (Run the unzip/publish/composer-update/migrate command in sequence) -php artisan plugin:uninstall // Uninstall Plugin +```sh +php artisan plugin:unzip # Unzip the plugin package to the plugin directory: /plugins/{fskey}/ +php artisan plugin:publish # Publish Plugin (static resources): /public/assets/{fskey}/ +php artisan plugin:unpublish # Unpublish (remove static resources) +php artisan plugin:composer-update # Update Plugin Composer Package +php artisan plugin:migrate # Run Plugin Migrate +php artisan plugin:migrate-rollback # Rollback Plugin Migrate +php artisan plugin:migrate-refresh # Refresh Plugin Migrate +php artisan plugin:migrate-reset # Reset Plugin Migrate +php artisan plugin:seed # Run Plugin Seed +php artisan plugin:install # Install Plugin (Run the unzip/publish/composer-update/migrate command in sequence) +php artisan plugin:uninstall # Uninstall Plugin ``` ## Management ### fresns mode -```php -php artisan plugin:activate // Activate Plugin -php artisan plugin:deactivate // Deactivate Plugin +```sh +php artisan plugin:activate # Activate Plugin +php artisan plugin:deactivate # Deactivate Plugin ``` ### artisan mode -```php -fresns plugin:activate // Activate Plugin -fresns plugin:deactivate // Deactivate Plugin +```sh +fresns plugin:activate # Activate Plugin +fresns plugin:deactivate # Deactivate Plugin ``` diff --git a/docs/artisan/management.md b/docs/artisan/management.md index a417ac5..95f4fe1 100644 --- a/docs/artisan/management.md +++ b/docs/artisan/management.md @@ -2,24 +2,24 @@ ## Activate Plugin -```php +```sh fresns plugin:activate ``` or -```php +```sh php artisan plugin:activate DemoPlugin ``` ## Deactivate Plugin -```php +```sh fresns plugin:deactivate ``` or -```php +```sh php artisan plugin:deactivate DemoPlugin ``` diff --git a/docs/artisan/started.md b/docs/artisan/started.md index c47e19a..3859050 100644 --- a/docs/artisan/started.md +++ b/docs/artisan/started.md @@ -4,13 +4,13 @@ When using plug-in instructions, you need to enable the development mode first, ## 1. Enable development mode -```php +```sh php artisan fresns ``` ## 2. Introduce the project path (auto-identify, just enter) -```php +```sh export /path/to/project/vendor/bin ``` @@ -18,19 +18,19 @@ export /path/to/project/vendor/bin - Create a plugin called `DemoPlugin` -```php +```sh fresns new DemoPlugin ``` - Go to the plugin `DemoPlugin` directory -```php +```sh fresns enter DemoPlugin ``` - Back to the fresns root directory -```php +```sh fresns back ``` diff --git a/docs/command-word/development.md b/docs/command-word/development.md index 43146cc..79a4461 100644 --- a/docs/command-word/development.md +++ b/docs/command-word/development.md @@ -4,7 +4,7 @@ As an independent functional module, the plug-in adopts "[command word](https:// ## Make -```php +```sh fresns make:cmdword-provider ``` diff --git a/docs/dto/index.md b/docs/dto/index.md index 1d896fb..904561d 100644 --- a/docs/dto/index.md +++ b/docs/dto/index.md @@ -8,7 +8,7 @@ To install through Composer, by run the following command: -```bash +```sh composer require fresns/dto ``` @@ -16,13 +16,13 @@ composer require fresns/dto - Generate a new DTO (path: `/app/DTO/`) -```php +```sh php artisan make:dto BaseDTO ``` - Generate a new DTO (to the specified path) -```php +```sh php artisan make:dto BaseDTO --path /app/Fresns/Panel ``` diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 06ad795..1918128 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -9,7 +9,7 @@ ## Installation -```bash +```sh composer require fresns/plugin-manager ``` @@ -19,7 +19,7 @@ composer require fresns/plugin-manager - Publish command -```bash +```sh php artisan vendor:publish --provider="Fresns\PluginManager\Providers\PluginServiceProvider" ``` diff --git a/docs/zh-Hans/artisan/control.md b/docs/zh-Hans/artisan/control.md index 49cddde..659112a 100644 --- a/docs/zh-Hans/artisan/control.md +++ b/docs/zh-Hans/artisan/control.md @@ -4,13 +4,13 @@ Unzip the plugin files into the `/plugins/` directory, the final directory will be `/plugins/{fskey}/`. -```php +```sh fresns plugin:unzip /www/wwwroot/fresns/storage/plugins/downloads/123e4567-e89b-12d3-a456-426614174000.zip ``` 或者 -```php +```sh php artisan plugin:unzip /www/wwwroot/fresns/storage/plugins/downloads/123e4567-e89b-12d3-a456-426614174000.zip ``` @@ -18,13 +18,13 @@ php artisan plugin:unzip /www/wwwroot/fresns/storage/plugins/downloads/123e4567- Publish static resources for the plugin `DemoPlugin`. -```php +```sh fresns plugin:publish ``` 或者 -```php +```sh php artisan plugin:publish DemoPlugin ``` @@ -34,13 +34,13 @@ php artisan plugin:publish DemoPlugin Unpublish static resources for the plugin `DemoPlugin`. -```php +```sh fresns plugin:unpublish ``` 或者 -```php +```sh php artisan plugin:unpublish DemoPlugin ``` @@ -50,13 +50,13 @@ php artisan plugin:unpublish DemoPlugin Composer all plugins. -```php +```sh fresns plugin:composer-update ``` 或者 -```php +```sh php artisan plugin:composer-update ``` @@ -64,13 +64,13 @@ php artisan plugin:composer-update Migrate the given plugin, or without a plugin an argument, migrate all plugins. -```php +```sh fresns plugin:migrate ``` 或者 -```php +```sh php artisan plugin:migrate DemoPlugin ``` @@ -78,13 +78,13 @@ php artisan plugin:migrate DemoPlugin Rollback the given plugin, or without an argument, rollback all plugins. -```php +```sh fresns plugin:migrate-rollback ``` 或者 -```php +```sh php artisan plugin:migrate-rollback DemoPlugin ``` @@ -92,13 +92,13 @@ php artisan plugin:migrate-rollback DemoPlugin Refresh the migration for the given plugin, or without a specified plugin refresh all plugins migrations. -```php +```sh fresns plugin:migrate-refresh ``` 或者 -```php +```sh php artisan plugin:migrate-refresh DemoPlugin ``` @@ -106,13 +106,13 @@ php artisan plugin:migrate-refresh DemoPlugin Reset the migration for the given plugin, or without a specified plugin reset all plugins migrations. -```php +```sh fresns plugin:migrate-reset ``` 或者 -```php +```sh php artisan plugin:migrate-reset DemoPlugin ``` @@ -120,13 +120,13 @@ php artisan plugin:migrate-reset DemoPlugin Seed the given plugin, or without an argument, seed all plugins. -```php +```sh fresns plugin:seed ``` 或者 -```php +```sh php artisan plugin:seed DemoPlugin ``` @@ -134,13 +134,13 @@ php artisan plugin:seed DemoPlugin Execute the `plugin:unzip`、`plugin:composer-update`、`plugin:migrate`、`plugin:publish` commands in that order. -```php +```sh fresns plugin:install /www/wwwroot/fresns/storage/plugins/123e4567-e89b-12d3-a456-426614174000.zip ``` 或者 -```php +```sh php artisan plugin:install /www/wwwroot/fresns/storage/plugins/123e4567-e89b-12d3-a456-426614174000.zip ``` @@ -150,14 +150,14 @@ php artisan plugin:install /www/wwwroot/fresns/storage/plugins/123e4567-e89b-12d Uninstall the plugin and select whether you want to clean the data of the plugin. -```php +```sh fresns plugin:uninstall --cleandata=true fresns plugin:uninstall --cleandata=false ``` 或者 -```php +```sh php artisan plugin:uninstall DemoPlugin --cleandata=true php artisan plugin:uninstall DemoPlugin --cleandata=false ``` diff --git a/docs/zh-Hans/artisan/create.md b/docs/zh-Hans/artisan/create.md index fedfda1..9c5e7ed 100644 --- a/docs/zh-Hans/artisan/create.md +++ b/docs/zh-Hans/artisan/create.md @@ -2,11 +2,11 @@ 创建一个 fskey 名为 `DemoPlugin` 的插件 -```php +```sh fresns plugin:make DemoPlugin ``` 或者 -```php - fresns new DemoPlugin +```sh +fresns new DemoPlugin ``` diff --git a/docs/zh-Hans/artisan/development.md b/docs/zh-Hans/artisan/development.md index 996edde..f9e3c90 100644 --- a/docs/zh-Hans/artisan/development.md +++ b/docs/zh-Hans/artisan/development.md @@ -4,7 +4,7 @@ Generate the given console command for the specified plugin. -```php +```sh fresns make:command CreateDemoCommand ``` @@ -12,7 +12,7 @@ fresns make:command CreateDemoCommand Generate a migration for specified plugin. -```php +```sh fresns make:migration create_demos_table ``` @@ -20,7 +20,7 @@ fresns make:migration create_demos_table Generate the given seed name for the specified plugin. -```php +```sh fresns make:seed seed_fake_demos ``` @@ -28,7 +28,7 @@ fresns make:seed seed_fake_demos Generate the given database factory for the specified plugin. -```php +```sh fresns make:factory FactoryName ``` @@ -36,7 +36,7 @@ fresns make:factory FactoryName Generate the given service provider name for the specified plugin. -```php +```sh fresns make:provider DemoServiceProvider ``` @@ -44,7 +44,7 @@ fresns make:provider DemoServiceProvider Generate a controller for the specified plugin. -```php +```sh fresns make:controller PostsController ``` @@ -52,7 +52,7 @@ fresns make:controller PostsController Generate the given model for the specified plugin. -```php +```sh fresns make:model Post ``` @@ -65,7 +65,7 @@ Optional options: Generate the given middleware name for the specified plugin. -```php +```sh fresns make:middleware CanReadPostsMiddleware ``` @@ -73,7 +73,7 @@ fresns make:middleware CanReadPostsMiddleware Generate a [DTO(data transfer object)](../dto/) for specified plugin. -```php +```sh fresns make:dto VerifySignDTO ``` @@ -81,7 +81,7 @@ fresns make:dto VerifySignDTO Generate the given mail class for the specified plugin. -```php +```sh fresns make:mail SendWeeklyPostsEmail ``` @@ -89,7 +89,7 @@ fresns make:mail SendWeeklyPostsEmail Generate the given notification class name for the specified plugin. -```php +```sh fresns make:notification NotificationAdminOfNewComment ``` @@ -97,7 +97,7 @@ fresns make:notification NotificationAdminOfNewComment 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. -```php +```sh fresns make:listener NotificationUsersOfANewPost fresns make:listener NotificationUsersOfANewPost --event=PostWasCreated @@ -109,7 +109,7 @@ fresns make:listener NotificationUsersOfANewPost --event=PostWasCreated --queued Generate the given request for the specified plugin. -```php +```sh fresns make:request CreatePostRequest ``` @@ -117,7 +117,7 @@ fresns make:request CreatePostRequest Generate the given event for the specified plugin. -```php +```sh fresns make:event BlogPostWasUpdated ``` @@ -125,7 +125,7 @@ fresns make:event BlogPostWasUpdated Generate the given job for the specified plugin. -```php +```sh fresns make:job JobName //A synchronous job class @@ -138,7 +138,7 @@ 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. -```php +```sh fresns make:policy PolicyName ``` @@ -148,7 +148,7 @@ 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. -```php +```sh fresns make:rule ValidationRule ``` @@ -158,7 +158,7 @@ Generate the given resource class for the specified plugin. It can have an optio 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. -```php +```sh fresns make:resource PostResource fresns make:resource PostResource --collection @@ -168,7 +168,7 @@ fresns make:resource PostResource --collection Generate the given test class for the specified plugin. -```php +```sh fresns make:test EloquentPostRepositoryTest ``` @@ -176,7 +176,7 @@ fresns make:test EloquentPostRepositoryTest Generate a console service provider for specified plugin. -```php +```sh fresns make:console-provider ``` @@ -184,7 +184,7 @@ fresns make:console-provider Generate a event provider for specified plugin. -```php +```sh fresns make:event-provider ``` @@ -194,7 +194,7 @@ fresns make:event-provider Generate a sql provider for specified plugin. -```php +```sh fresns make:sql-provider ``` @@ -204,7 +204,7 @@ fresns make:sql-provider Generate a exception provider for specified plugin. -```php +```sh fresns make:exception-provider ``` @@ -212,7 +212,7 @@ fresns make:exception-provider Generate a [cmd word service provider](../command-word/) for specified plugin. -```php +```sh fresns make:cmdword-provider ``` diff --git a/docs/zh-Hans/artisan/index.md b/docs/zh-Hans/artisan/index.md index 61fcfa8..1090047 100644 --- a/docs/zh-Hans/artisan/index.md +++ b/docs/zh-Hans/artisan/index.md @@ -2,90 +2,90 @@ ## 使用指令 -```php -php artisan fresns // 进入插件开发模式 +```sh +php artisan fresns # 进入插件开发模式 -fresns plugin // 查看所有可用指令 -fresns plugin:list // 查看所有已安装插件 -fresns new // 创建新插件 -fresns enter // 进入指定插件目录 -fresns back // 回到项目根目录 +fresns plugin # 查看所有可用指令 +fresns plugin:list # 查看所有已安装插件 +fresns new # 创建新插件 +fresns enter # 进入指定插件目录 +fresns back # 回到项目根目录 ``` ## 开发指令 -```php -fresns make:command // 生成插件 Command -fresns make:migration // 生成插件 Migration -fresns make:seed // 生成插件 Seed -fresns make:factory // 生成插件 Factory -fresns make:provider // 生成插件 Provider -fresns make:controller // 生成插件 Controller -fresns make:model // 生成插件 Model -fresns make:middleware // 生成插件 Middleware -fresns make:dto // 生成插件 DTO (fresns/dto) -fresns make:mail // 生成插件 Mail -fresns make:notification // 生成插件 Notification -fresns make:listener // 生成插件 Listener -fresns make:request // 生成插件 Request -fresns make:event // 生成插件 Event -fresns make:job // 生成插件 Job -fresns make:policy // 生成插件 Policy -fresns make:rule // 生成插件 Rule -fresns make:resource // 生成插件 Resource -fresns make:test // 生成插件 Test -fresns make:schedule-provider // 生成插件任务调度提供者 -fresns make:event-provider // 生成插件事件服务提供者 -fresns make:sql-provider // 生成插件 SQL 提供者 -fresns make:cmdword-provider // 生成插件命令字提供者 (fresns/cmd-word-manager) +```sh +fresns make:command # 生成插件 Command +fresns make:migration # 生成插件 Migration +fresns make:seed # 生成插件 Seed +fresns make:factory # 生成插件 Factory +fresns make:provider # 生成插件 Provider +fresns make:controller # 生成插件 Controller +fresns make:model # 生成插件 Model +fresns make:middleware # 生成插件 Middleware +fresns make:dto # 生成插件 DTO (fresns/dto) +fresns make:mail # 生成插件 Mail +fresns make:notification # 生成插件 Notification +fresns make:listener # 生成插件 Listener +fresns make:request # 生成插件 Request +fresns make:event # 生成插件 Event +fresns make:job # 生成插件 Job +fresns make:policy # 生成插件 Policy +fresns make:rule # 生成插件 Rule +fresns make:resource # 生成插件 Resource +fresns make:test # 生成插件 Test +fresns make:schedule-provider # 生成插件任务调度提供者 +fresns make:event-provider # 生成插件事件服务提供者 +fresns make:sql-provider # 生成插件 SQL 提供者 +fresns make:cmdword-provider # 生成插件命令字提供者 (fresns/cmd-word-manager) ``` ## 控制指令 ### fresns 模式 -```php -fresns plugin:unzip // 解压插件包到插件目录 /plugins/{fskey}/ -fresns plugin:publish // 发布插件(分发静态资源) /public/assets/{fskey}/ -fresns plugin:unpublish // 撤销发布(删除静态资源) -fresns plugin:composer-update // 更新插件 Composer 依赖包 -fresns plugin:migrate // 执行插件 Migrate -fresns plugin:migrate-rollback // 回滚插件 Migrate -fresns plugin:migrate-refresh // 刷新插件 Migrate -fresns plugin:migrate-reset // 重置插件 Migrate -fresns plugin:seed // 执行插件 Seed -fresns plugin:install // 安装插件(逐个执行 unzip/publish/composer-update/migrate 指令) -fresns plugin:uninstall // 卸载插件 +```sh +fresns plugin:unzip # 解压插件包到插件目录 /plugins/{fskey}/ +fresns plugin:publish # 发布插件(分发静态资源) /public/assets/{fskey}/ +fresns plugin:unpublish # 撤销发布(删除静态资源) +fresns plugin:composer-update # 更新插件 Composer 依赖包 +fresns plugin:migrate # 执行插件 Migrate +fresns plugin:migrate-rollback # 回滚插件 Migrate +fresns plugin:migrate-refresh # 刷新插件 Migrate +fresns plugin:migrate-reset # 重置插件 Migrate +fresns plugin:seed # 执行插件 Seed +fresns plugin:install # 安装插件(逐个执行 unzip/publish/composer-update/migrate 指令) +fresns plugin:uninstall # 卸载插件 ``` ### artisan 模式 -```php -php artisan plugin:unzip // 解压插件包到插件目录 /plugins/{fskey}/ -php artisan plugin:publish // 发布插件(分发静态资源) /public/assets/{fskey}/ -php artisan plugin:unpublish // 撤销发布(删除静态资源) -php artisan plugin:composer-update // 更新插件 Composer 依赖包 -php artisan plugin:migrate // 执行插件 Migrate -php artisan plugin:migrate-rollback // 回滚插件 Migrate -php artisan plugin:migrate-refresh // 刷新插件 Migrate -php artisan plugin:migrate-reset // 重置插件 Migrate -php artisan plugin:seed // 执行插件 Seed -php artisan plugin:install // 安装插件(逐个执行 unzip/publish/composer-update/migrate 指令) -php artisan plugin:uninstall // 卸载插件 +```sh +php artisan plugin:unzip # 解压插件包到插件目录 /plugins/{fskey}/ +php artisan plugin:publish # 发布插件(分发静态资源) /public/assets/{fskey}/ +php artisan plugin:unpublish # 撤销发布(删除静态资源) +php artisan plugin:composer-update # 更新插件 Composer 依赖包 +php artisan plugin:migrate # 执行插件 Migrate +php artisan plugin:migrate-rollback # 回滚插件 Migrate +php artisan plugin:migrate-refresh # 刷新插件 Migrate +php artisan plugin:migrate-reset # 重置插件 Migrate +php artisan plugin:seed # 执行插件 Seed +php artisan plugin:install # 安装插件(逐个执行 unzip/publish/composer-update/migrate 指令) +php artisan plugin:uninstall # 卸载插件 ``` ## 管理指令 ### fresns 模式 -```php -fresns plugin:activate // 启用插件 -fresns plugin:deactivate // 停用插件 +```sh +fresns plugin:activate # 启用插件 +fresns plugin:deactivate # 停用插件 ``` ### artisan 模式 -```php -php artisan plugin:activate // 启用插件 -php artisan plugin:deactivate // 停用插件 +```sh +php artisan plugin:activate # 启用插件 +php artisan plugin:deactivate # 停用插件 ``` diff --git a/docs/zh-Hans/artisan/management.md b/docs/zh-Hans/artisan/management.md index 532a92f..6d360b1 100644 --- a/docs/zh-Hans/artisan/management.md +++ b/docs/zh-Hans/artisan/management.md @@ -2,24 +2,24 @@ ## 启用插件 -```php +```sh fresns plugin:activate ``` 或者 -```php +```sh php artisan plugin:activate DemoPlugin ``` ## 停用插件 -```php +```sh fresns plugin:deactivate ``` 或者 -```php +```sh php artisan plugin:deactivate DemoPlugin ``` diff --git a/docs/zh-Hans/artisan/started.md b/docs/zh-Hans/artisan/started.md index 5c5bf4f..3a37170 100644 --- a/docs/zh-Hans/artisan/started.md +++ b/docs/zh-Hans/artisan/started.md @@ -4,13 +4,13 @@ ## 1、启用开发模式 -```php +```sh php artisan fresns ``` ## 2、引入项目路径(自动识别,回车即可) -```php +```sh export /path/to/project/vendor/bin ``` @@ -18,19 +18,19 @@ export /path/to/project/vendor/bin - 创建名为 DemoPlugin 的插件 -```php +```sh fresns new DemoPlugin ``` - 进入插件 DemoPlugin 目录 -```php +```sh fresns enter DemoPlugin ``` - 退出插件目录,回到项目根目录 -```php +```sh fresns back ``` diff --git a/docs/zh-Hans/command-word/development.md b/docs/zh-Hans/command-word/development.md index 3de0c0a..b727f31 100644 --- a/docs/zh-Hans/command-word/development.md +++ b/docs/zh-Hans/command-word/development.md @@ -4,7 +4,7 @@ ## 生成 -```php +```sh fresns make:cmdword-provider ``` diff --git a/docs/zh-Hans/dto/index.md b/docs/zh-Hans/dto/index.md index 2b0781f..49ed674 100644 --- a/docs/zh-Hans/dto/index.md +++ b/docs/zh-Hans/dto/index.md @@ -14,13 +14,13 @@ composer require fresns/dto - 生成一个新的 DTO(路径:`/app/DTO/`) -```php +```sh php artisan make:dto BaseDTO ``` - 生成一个新的 DTO(到指定路径) -```php +```sh php artisan make:dto BaseDTO --path /app/Fresns/Panel ```