Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imanilchaudhari/yii2-asset-free
Assets free Yii2, Great for CONSOLE and API apps.
https://github.com/imanilchaudhari/yii2-asset-free
Last synced: about 2 months ago
JSON representation
Assets free Yii2, Great for CONSOLE and API apps.
- Host: GitHub
- URL: https://github.com/imanilchaudhari/yii2-asset-free
- Owner: imanilchaudhari
- License: mit
- Created: 2017-11-27T08:12:20.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T11:39:08.000Z (3 months ago)
- Last Synced: 2024-10-13T01:16:32.609Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Yii 2 Asset Free Template
This is a project template suitable for API & console apps. This app template is without the bower & npm package, which makes it lightweight.
DIRECTORY STRUCTURE
-------------------config/ contains application configurations
database/ contains database migrations, seeders
public/ contains the entry script and Web resources
resources/ contains various tests for the basic application
mail/ contains view files for e-mails
runtime/ contains files generated during runtime
src/
commands/ contains console commands (controllers)
controllers/ contains Web controller classes
models/ contains model classes
tests/ contains various tests for the basic application
vendor/ contains dependent 3rd-party packagesREQUIREMENTS
------------The minimum requirement by this project template that your Web server supports PHP 7.4.
INSTALLATION
------------### Install via Composer
If you do not have [Composer](https://getcomposer.org/), you may install it by following the instructions
at [getcomposer.org](https://getcomposer.org/doc/00-intro.md#installation-nix).You can then install this project template using the following command:
~~~
composer create-project --prefer-dist imanilchaudhari/yii2-asset-free basic-api
~~~Now you should be able to access the application through the following URL, assuming `basic-api` is the directory
directly under the Web root.~~~
http://localhost/basic-api/public/
~~~CONFIGURATION
-------------### Database
Edit the file `config/db.php` with real data, for example:
```php
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=database',
'username' => 'root',
'password' => '1234',
'charset' => 'utf8',
];
```**NOTES:**
- Yii won't create the database for you, this has to be done manually before you can access it.
- Check and edit the other files in the `config/` directory to customize your application as required.
- Refer to the README in the `tests` directory for information specific to basic application tests.