mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-15 18:23:26 +03:00
- Fixed issue #227 causing custom resource-routes not to be loaded after latest update. - Optimized `RouteResource` class. - Renamed `IRestController` to `IResourceController`. - Added unit-tests for RouterResource. - Simplified unit-tests with the `TestRouter` custom router class.
39 lines
569 B
PHP
39 lines
569 B
PHP
<?php
|
|
class ResourceController implements \Pecee\Controllers\IResourceController
|
|
{
|
|
|
|
public function index()
|
|
{
|
|
echo 'index';
|
|
}
|
|
|
|
public function show($id)
|
|
{
|
|
echo 'show ' . $id;
|
|
}
|
|
|
|
public function store()
|
|
{
|
|
echo 'store';
|
|
}
|
|
|
|
public function create()
|
|
{
|
|
echo 'create';
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
echo 'edit ' . $id;
|
|
}
|
|
|
|
public function update($id)
|
|
{
|
|
echo 'update ' . $id;
|
|
}
|
|
|
|
public function destroy($id)
|
|
{
|
|
echo 'destroy ' . $id;
|
|
}
|
|
} |