Commit 2b1aa42e authored by Nicolas Widart's avatar Nicolas Widart

Renaming functions to respect the RESTful spec

parent 739090ee
...@@ -21,12 +21,19 @@ interface BaseRepository ...@@ -21,12 +21,19 @@ interface BaseRepository
* @param $data * @param $data
* @return mixed * @return mixed
*/ */
public function add($data); public function create($data);
/** /**
* @param $ids * Update a category
* @param $id
* @param $data
* @return mixed * @return mixed
*/ */
public function remove($ids); public function update($id, $data);
/**
* @param $ids
* @return mixed
*/
public function destroy($ids);
} }
...@@ -43,7 +43,7 @@ abstract class EloquentBaseRepository implements BaseRepository ...@@ -43,7 +43,7 @@ abstract class EloquentBaseRepository implements BaseRepository
* @param mixed $data * @param mixed $data
* @return mixed * @return mixed
*/ */
public function add($data) public function create($data)
{ {
return $this->model->create($data); return $this->model->create($data);
} }
...@@ -52,7 +52,7 @@ abstract class EloquentBaseRepository implements BaseRepository ...@@ -52,7 +52,7 @@ abstract class EloquentBaseRepository implements BaseRepository
* @param int|int[] $ids * @param int|int[] $ids
* @return mixed * @return mixed
*/ */
public function remove($ids) public function destroy($ids)
{ {
return $this->model->destroy($ids); return $this->model->destroy($ids);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment