https://github.com/biladina/yii2-basic
https://github.com/biladina/yii2-basic
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/biladina/yii2-basic
- Owner: biladina
- License: bsd-3-clause
- Created: 2023-01-10T19:54:14.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T20:12:03.000Z (over 2 years ago)
- Last Synced: 2025-01-13T16:50:46.064Z (9 months ago)
- Language: PHP
- Size: 92.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Aplikasi App - Nama Institusi (Powered by Yii2)
Aplikasi ini dibuat untuk {ganti sendiri}.
## DIRECTORY STRUCTURE
assets/ contains assets definition
config/ contains application configurations
console/ contains console commands (controllers)
controllers/ contains Web controller classes
environments/ contains environment-based overrides
helpers/ contains useful helper classes
mail/ contains view files for e-mails
migrations/ contains all migration files
models/ contains model classes
runtime/ contains files generated during runtime
tests/ contains various tests for the basic application
themes/ contains application view layout template
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
web/ contains the entry script and Web resources## REQUIREMENTS
The minimum requirement by this project that your Web server supports PHP 8.1 and MariaDB 10.
## WHAT CHANGE?
1. Add useful extension/module
- [yii2-admin](https://github.com/mdmsoft/yii2-admin)
- [almost all kartik-v extension](https://demos.krajee.com)
- [yii2-adminlte3](https://github.com/hail812/yii2-adminlte3)
- [yii2-ajaxcrud-bs4](https://github.com/biladina/yii2-ajaxcrud-bs4)
- [yii2-curl](https://github.com/linslin/Yii2-Curl)
- [phpspreadsheet](https://github.com/PHPOffice/PhpSpreadsheet)
- [yii2-tinymce](https://github.com/alexantr/yii2-tinymce)
- [yii2-captcha-extended](https://github.com/lubosdz/yii2-captcha-extended)
- [var-dumper](https://github.com/symfony/var-dumper)
- [jwt](https://github.com/bizley/yii2-jwt)2. Separated project state, whether you choose for development or production state
3. API template ready to use
## INSTALLATION
Install neccesary package :
```
composer install
```Initiate project state, choose project state you want to use, `0` for development, and `1` for production :
```
php init
```Ope file `config/components.php`, and change `dbname`, `username` and `password`, for example:
```php
return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'schemaMap' => [
'mysql' => SamIT\Yii2\MariaDb\Schema::class
],
'dsn' => 'mysql:host=localhost;dbname=db_name',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
],
]
];
```Run migration for RBAC :
```
php yii migrate --migrationPath=@yii/rbac/migrations
```Run migration for RBAC Management :
```
php yii migrate --migrationPath=@mdm/admin/migrations
```Run migration for the rest of application :
```
php yii migrate
```Run this to add admin user, change `username` and `password` with you like :
```
php yii config/tambah-admin username password
```You can then access the application through the following URL :
```
http://localhost/yii2-basic
```Generate API key if you want to use it :
```
php yii config/generate-api-key 'config/api-local.php'
```You can then access API endpoint through the following URL :
```
http://localhost/yii2-basic/api/v1
```