yii2-extensions/app-basic 问题修复 & 功能扩展

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

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

yii2-extensions/app-basic

最新稳定版本:0.1.2

Composer 安装命令:

composer create-project yii2-extensions/app-basic

包简介

Web Application Basic

README 文档

README

Yii Framework

Web Application Basic


Codeception PHPStan

A modern, Bootstrap 5-powered Yii2 application template for rapid development
Clean architecture, production-ready features, and developer-friendly configuration

Web Application Basic

Features

Feature Overview

Available deployment options

Traditional Web Servers

Classic web-server + PHP-FPM setup; simple and widely supported for deployment.

Apache Nginx FrankenPHP Classic

High-Performance Worker Mode

Long-running PHP workers for higher throughput and lower latency.

FrankenPHP RoadRunner

Important

For setup instructions, see README.md in each branch.

How it works

The Yii2 Web Application Basic template provides a complete foundation for building modern web applications. Unlike starting from scratch, this template includes.

  1. Pre-configured structure with organized directories for assets, views, models, and controllers.
  2. Bootstrap 5 integration for responsive, mobile-first user interfaces.
  3. Security features including CSRF protection and input validation.
  4. Development tools for debugging, logging, and testing.

Why use this template

  • Rapid development: Start building features immediately without setup overhead.
  • Best practices: Follow Yii2 conventions and modern web development standards.
  • Extensible: Easy to customize and extend for specific project requirements.
  • Production-ready: Includes security features and optimizations for deployment.

Note

Also, make sure to install npm for frontend dependency management.

Installation

composer create-project --prefer-dist yii2-extensions/app-basic:^0.1 app-basic
cd app-basic

Quick start

Start development server

# Using built-in PHP server
php -S localhost:8080 -t web

# Or using Yii console command
./yii serve

Important

Your application will be available at http://localhost:8080 or at the address set in --address option.

Directory structure

root/
├── config/                Configuration files
│   ├── common/            Common configuration
│   ├── console/           Console configuration
│   ├── web/               Web configuration
│   └── messages.php       Translation config
├── src/
│   ├── framework/         Framework assets & resources
│   │   ├── asset/         Asset bundles
│   │   └── resource/      CSS, JS, layouts, messages
│   └── usecase/           Application use cases
│       ├── hello/         Console command example
│       └── site/          Site pages
├── tests/                 Test suites
├── vendor/                Composer dependencies
└── web/                   Web server document root

Creating your first page

<?php
// src/usecase/site/SiteController.php

declare(strict_types=1);

namespace app\usecase\site;

use yii\web\Controller;

final class SiteController extends Controller
{
    public function actionIndex(): string
    {
        return $this->render('index');
    }
}

Console commands

# Run the hello command
./yii hello/index

# Generate translations
./yii message config/messages.php

# Clear cache
./yii cache/flush-all

Package information

PHP Yii 2.0.x Yii 22.0.x Latest Stable Version Total Downloads

Quality code

Codecov PHPStan Level Max Super-Linter StyleCI

Documentation

For detailed configuration options and advanced usage:

Our social networks

Follow on X

License

License

统计信息

  • 总下载量: 371
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2023-10-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固