democrito88/demovel
Composer 安装命令:
composer require democrito88/demovel
包简介
Library that create a structure of a simple PHP project on MVC achitecture.
README 文档
README
Library that create a structure of a simple PHP project on MVC achitecture. It uses Symfony libraries as dependencies such as Doctrine.
Usage
Create a new project
To create a new project, install this package and run the command:
composer install
./bin/console create:new <my-new-project>
It will create a project with the following structure:
root-folder
├──public
| └──index.php
├──src
| ├──Provider
| | └──EntityServiceProvider.php
| ├──Controller
| | ├──InterfaceController.php
| | ├──Controller.php
| | ├──UserController.php
| | └──TokenController.php
| └──Entity
| ├──Entity.php
| ├──User.php
| └──Token.php
├──routes
| ├──router.php
| └──routes.php
├──.env
└──.htaccess
Create migration basic structure
./bin/console attach:migration
This command will create the basic structure for create and run migration classes as it follows:
root-folder
└──database
└──migrations
├──CreateTable.php
├──CreateUsersTable.php
└──runMigrations.php
All migration classes must extend CreateTable class and be mentioned in runMigrations.php script.
Create seeding basic structure
./bin/console attach:seeding
This command will create the basic structure for create and run seeding classes as it follows:
root-folder
└──database
└──seed
├──Seeder.php
├──UsersSeeder.php
└──runSeeders.php
All seedeing classes must extend Seeder class and be mentioned in runSeeders.php script.
Create a mail class
./bin/console attach:mail
It will create the Sender.php file inside a Email folder as it follows:
root-folder
└──src
└──Email
└──Seeder.php
This package uses PHPMailer to send an email.
Create new Entity
.bin/console new:entity <name>
This command will create a new Entity class in the src/Entity directory. You just need to pass the name parameter.
This projects uses Dorctrine ORM annotations in its Entities.
Create new Controller
.bin/console new:controller <name>
This command will create a new Controller class in the src/Controller directory. You just need to pass the name parameter.
Author
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-16