https://github.com/nullrefexcep/yii2-multisite
https://github.com/nullrefexcep/yii2-multisite
yii2 yii2-extension
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nullrefexcep/yii2-multisite
- Owner: NullRefExcep
- Created: 2017-02-12T08:36:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-10-01T20:58:31.000Z (about 4 years ago)
- Last Synced: 2025-03-21T22:21:42.269Z (8 months ago)
- Topics: yii2, yii2-extension
- Language: PHP
- Size: 18.6 KB
- Stars: 2
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yii2 Multisite
===============
[](https://packagist.org/packages/nullref/yii2-multisite) [](https://packagist.org/packages/nullref/yii2-multisite) [](https://packagist.org/packages/nullref/yii2-multisite) [](https://packagist.org/packages/nullref/yii2-multisite)
Module for multi site (WIP)
Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist nullref/yii2-multisite "*"
```
or add
```
"nullref/yii2-multisite": "*"
```
to the require section of your `composer.json` file.
Then You have run console command for install this module:
```
php yii module/install nullref/yii2-multisite
```
Pay attention that if you don't use our [application template](https://github.com/NullRefExcep/yii2-boilerplate)
it needs to change config files structure to have ability run commands that show above.
Please check this [documentation section](https://github.com/NullRefExcep/yii2-core#config-structure)
You need to add module to bootstrap list of application:
```php
//...
'bootstrap' => [
'multisite',
//...
],
//...
```
Using with admin module
----------------------------
You can use this module with modules:
- [Yii2 Admin](https://github.com/NullRefExcep/yii2-admin).
- [Yii2 Full Admin](https://github.com/NullRefExcep/yii2-full-admin).
Models overriding
-----------------
```php
'multisite' => [
'class' => 'nullref\multisite\Module',
'classMap' => [
'Site' => 'app\models\Site',
'SiteQuery' => 'app\models\SiteQuery',
],
],
```