Yii3 - How to start

Comparing #27 with #28

Revision #28 was created by rackycz rackycz on Oct 13, 2025, 7:40:34 AM.

edit

Content

[...]
Note:
- Instead of installing local WAMP- or XAMPP-server I will be using Docker.
- Do not forget about a modern IDE like PhpStorm, which comes bunled with all you will ever need.

> All the code will be soon available in my new [GitHub repository](https://github.com/rackycz/yii3api). I will be using is as a boiler-plate for my future projects so it should be always up to date.
 
 
# Yii3 - How to start

Yii3 offers more basic applications: Web, Console, API. I will be using the API application:
[...]
... then the web will be available on URL
- http://localhost:80

 
If you check the returned data you will see a `<xml>` inside the browser. In order to obtain JSON-response, paste the URL into Postman. (so called "content negotiation" does this auto-decision)run via browser, XML is returned
 
- If run via Postman or Ajax, JSON is returned


If you want to modify the data that was returned by the endpoint, just open the action-class `src/Api/IndexAction.php` and add one more element to the returned array.

## Adding DB into your project
[...]