shekarsiri / structure

Laravel artisan 命令,用于创建基本的应用结构。

1.1.3 2015-11-24 12:26 UTC

This package is not auto-updated.

Last update: 2024-09-17 09:07:51 UTC


README

Laravel artisan 命令,用于创建基本的应用结构。

安装

composer require shekarsiri/strucutre

更新配置文件(config/app.php)

'providers' => [
	...,
	ShekarSiri\Structure\StructureServiceProvider::class,
];

运行命令

php artisan structure:make SomeApp/Post
php artisan structure:make SomeApp/Product

结果


└── SomeApp
    ├── Post
    │   ├── Events
    │   │   ├── PostCreatedEvent.php
    │   │   ├── PostDeletedEvent.php
    │   │   └── PostUpdatedEvent.php
    │   ├── Exceptions
    │   ├── Facades
    │   │   └── Post.php
    │   ├── Jobs
    │   │   ├── PostCreate.php
    │   │   ├── PostDelete.php
    │   │   └── PostUpdate.php
    │   ├── Listeners
    │   ├── Post.php
    │   ├── PostService.php
    │   ├── PostServiceProvider.php
    │   ├── Providers
    │   │   └── PostEventServiceProvider.php
    │   ├── Repositories
    │   │   ├── PostRepository.php
    │   │   └── PostRepositoryEloquent.php
    │   └── Requests
    │       ├── PostCreateRequest.php
    │       └── PostUpdateRequest.php
    └── Product
        ├── Events
        │   ├── ProductCreatedEvent.php
        │   ├── ProductDeletedEvent.php
        │   └── ProductUpdatedEvent.php
        ├── Exceptions
        ├── Facades
        │   └── Product.php
        ├── Jobs
        │   ├── ProductCreate.php
        │   ├── ProductDelete.php
        │   └── ProductUpdate.php
        ├── Listeners
        ├── Product.php
        ├── ProductService.php
        ├── ProductServiceProvider.php
        ├── Providers
        │   └── ProductEventServiceProvider.php
        ├── Repositories
        │   ├── ProductRepository.php
        │   └── ProductRepositoryEloquent.php
        └── Requests
            ├── ProductCreateRequest.php
            └── ProductUpdateRequest.php