Skip to content

Concepts

Ratnadeep Deb edited this page Dec 10, 2016 · 2 revisions

Routing

When the URL http://www.example.com/mycontroller/myaction is entered in the address bar, LightPHP will look for a controller by name MycontrollerController having a method getMyaction.

Directory structure

app
    config
    controllers
public
    index.php
vendor
composer.json

Output format

Success

{
    "data": {
        "key1": "data returned by controller",
        "key2": "another data returned by controller"
    }
}

Failure

{
    "errors": {
        "message": "Internal error occurred"
    }
}

Clone this wiki locally