PHP code example of lorisleiva / request-controller
1. Go to this page and download the library: Download lorisleiva/request-controller library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lorisleiva / request-controller example snippets
php
class MyController extends RequestController
{
public function middleware()
{
return [];
}
public function authorize()
{
return true;
}
public function rules()
{
return [];
}
public function __invoke()
{
// ...
}
}