Controllers - WaZeR-Adrien/Lightwork-api GitHub Wiki
How to create Controller ?
Create a controller class like Article and create the method what you want:
<?php
namespace Controllers;
class Article extends Controller {
public static function remove(Request $request, Response $response)
{
$article = new Article($request->getParams()->id);
$article->remove();
return $response->render('S_D001')->toJson();
}
}
The parameters $request and $response are required. For more information you can check the Request and Response documentation.