Commit 945b863a authored by King Alex's avatar King Alex

Ajout API

parent b3d01f19
class ApiController extends RecipeController {
public function respond($contents, $statusCode = 200, $value="application/json"){
$response = Response::make($contents , $statusCode);
$response->header('Content-Type', $value);
return $response;
public function list(){
return $this->respond( parent::getList() );
public function search(){
return $this->respond( parent::getSearch() );
public function show($id){
return $this->respond( parent::getShow($id) );
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment