PHPackages                             bao218/yii2-sample - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. bao218/yii2-sample

ActiveProject[Framework](/categories/framework)

bao218/yii2-sample
==================

Yii2 sample

01CSS

Since Nov 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Bao218/yii2-sample)[ Packagist](https://packagist.org/packages/bao218/yii2-sample)[ RSS](/packages/bao218-yii2-sample/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Yii 2 Advanced Project Template
===============================

[](#yii-2-advanced-project-template)

Advanced Project Template for demo, include frontend and backend(with RBAC authorization), just practice dont use in production.

[![Latest Stable Version](https://camo.githubusercontent.com/7cd2f0bb0889976811cc7f02a3595a844ad8ae5c21bcb68f8497c6534b60f758/68747470733a2f2f706f7365722e707567782e6f72672f726f636b69656c696e2f796969322d6170702d616476616e6365642d74656d706c6174652f762f737461626c652e706e67)](https://packagist.org/packages/rockielin/yii2-app-advanced-template)[![Total Downloads](https://camo.githubusercontent.com/edea7e7a1737d31681a632d00535b48fa83b21ac51ade62508ef36694d3f4017/68747470733a2f2f706f7365722e707567782e6f72672f726f636b69656c696e2f796969322d6170702d616476616e6365642d74656d706c6174652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/rockielin/yii2-app-advanced-template)

安裝
--

[](#安裝)

若尚未安裝composer, 先執行composer安裝

```
curl -sS https://getcomposer.org/installer | php

```

透過composer直接建立新專案:

```
php composer.phar create-project --prefer-dist --stability=dev bao218/yii2-sample project-name

```

或

clone此專案

```
php composer.phar install --no-interaction
composer run-script post-install-cmd

```

更新

```
php composer.phar update --no-interaction

```

拷貝設定檔 設定domain, db相關資訊 (因部署環境會變動的設定)

```
cp common/congif/main.example.php common/congif/main.php

```

本機開發啟動(port自訂)
--------------

[](#本機開發啟動port自訂)

後台  測試帳密( / 123456)

```
php yii-admin serve --port=8080

```

前台  測試帳密( / 123456)

```
php yii-front serve --port=8081

```

API

```
php yii-api serve --port=8082

```

common(圖片共用程式)

```
php yii-common serve --port=8083

```

本機開發工具
------

[](#本機開發工具)

Debug Tool (不同站台debug路徑不同)

```
http://localhost:808x/debug

```

產生器

```
http://localhost:808x/gii

```

清cache(範例用FileCache, 不同站台cache路徑不同)

```
http://localhost:808x/job/clearcache

```

Docker執行:
---------

[](#docker執行)

部署環境若使用Docker, 須先設定nginx/conf.d

進入 ./docker後執行

```
docker-compose up -d

```

Docker其他命令:
-----------

[](#docker其他命令)

docker setting

```
docker-compose.yml

```

building

```
docker-compose build

```

start continer

```
docker-compose up -d

```

stop

```
docker-compose down -v

```

show log

```
docker-compose logs -f

```

access continer

```
docker-compose exec php bash

```

Docker中Supervisor命令:
--------------------

[](#docker中supervisor命令)

啟動

```
supervisord -c /etc/supervisor/supervisord.conf

```

查看supervisor是否啟動

```
ps aux | grep supervisor

```

關閉supervisor主進程

```
supervisorctl shutdown
pkill -f supervisord  # kill it

```

查看supervisor執行的子進程

```
supervisorctl status

```

其他:
---

[](#其他)

後台Theme有些混亂 待處理

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/74067095?v=4)[Bao218](/maintainers/Bao218)[@Bao218](https://github.com/Bao218)

---

Top Contributors

[![Bao218](https://avatars.githubusercontent.com/u/74067095?v=4)](https://github.com/Bao218 "Bao218 (7 commits)")

### Embed Badge

![Health badge](/badges/bao218-yii2-sample/health.svg)

```
[![Health](https://phpackages.com/badges/bao218-yii2-sample/health.svg)](https://phpackages.com/packages/bao218-yii2-sample)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M255](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
