juneszh/alight-project 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

juneszh/alight-project

最新稳定版本:v1.2.2

Composer 安装命令:

composer create-project juneszh/alight-project

包简介

Alight Project is a project template with Alight framework.

README 文档

README

Alight-Project is a project template with Alight framework, which helps users to quickly build the directory structure of the project and create an admin panel by Alight-Admin, it is very suitable for beginners.

Alight Family

Project Description
Alight Basic framework built-in routing, database, caching, etc.
Alight-Admin A full admin panel extension based on Alight. No front-end coding required.
Alight-Project A template for beginner to easily create web applications by Alight/Alight-Admin.

Requirements

PHP 7.4+

Usage

$ composer create-project juneszh/alight-project {PROJECT_DIRECTORY}

Directory Structure

  • app/ Contains the core code of your application.
    • controller/ Contains controllers that handle requests (MVC pattern).
    • job/ Contains jobs run by the time-based scheduler.
    • model/ Contains models of database (MVC pattern).
    • service/ Contains the business logics.
    • view/ Contains views with page templates (MVC pattern).
    • bootstrap.php The web bootstraps.
    • scheduler.php Job scheduler run by CRON.
  • config/ Contains all of application's configuration files.
    • admin/ Contains the admin's menu and console configuration.
    • route/ Contains the route's configuration.
    • app.php Application's configuration.
    • job.php Job scheduler's configuration.
  • public/ Contains the index.php file and assets such as images, JavaScript, and CSS.
    • favicon.ico Icon for the web application.
    • index.php Entry point for all requests entering the web application.
  • storage/ Contains logs, route caches, file caches, and other files generated by the framework.
  • vendor/ Contains composer dependencies.

Shortcut Namespaces

The classes in the application are always called from the business code, so we define some shortcut namespaces to improve coding efficiency.

Namespace Directory
ctr app/controller
job app/job
mod app/model
svc app/service

For example:

// The route handler points to function 'index' in app/Controllers/Pages.php
Alight\Route::get('/', [\ctr\Pages::class, 'index']);

Composer Scripts

The admin panel is not built by default when creating project, you need to do it with follow scripts: (Please make sure the database has been configured)

$ cd {PROJECT_DIRECTORY}
$ composer require juneszh/alight-admin
$ composer run admin-install
$ composer run admin-download

List of scripts:

Name Description
admin-install Initialize the runtime environment required by the Alight-Admin.
admin-build Build the admin panel front-end resources by npm packages. (Node.js required)
admin-download Download the admin panel front-end resources from Alight-Admin releases.

License

统计信息

  • 总下载量: 41
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固