Rename controller methods following Laravel's resource controllers
This commit is contained in:
@@ -36,7 +36,7 @@ class IncidentUpdateController extends AbstractApiController
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function getIncidentUpdates(Incident $incident)
|
||||
public function index(Incident $incident)
|
||||
{
|
||||
$updates = IncidentUpdate::orderBy('created_at', 'desc');
|
||||
|
||||
@@ -59,7 +59,7 @@ class IncidentUpdateController extends AbstractApiController
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function getIncidentUpdate(Incident $incident, IncidentUpdate $update)
|
||||
public function show(Incident $incident, IncidentUpdate $update)
|
||||
{
|
||||
return $this->item($update);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ class IncidentUpdateController extends AbstractApiController
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function postIncidentUpdate(Incident $incident)
|
||||
public function store(Incident $incident)
|
||||
{
|
||||
try {
|
||||
$update = dispatch(new CreateIncidentUpdateCommand(
|
||||
@@ -95,7 +95,7 @@ class IncidentUpdateController extends AbstractApiController
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function putIncidentUpdate(Incident $incident, IncidentUpdate $update)
|
||||
public function update(Incident $incident, IncidentUpdate $update)
|
||||
{
|
||||
try {
|
||||
$update = dispatch(new UpdateIncidentUpdateCommand(
|
||||
@@ -119,7 +119,7 @@ class IncidentUpdateController extends AbstractApiController
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function deleteIncidentUpdate(Incident $incident, IncidentUpdate $update)
|
||||
public function destroy(Incident $incident, IncidentUpdate $update)
|
||||
{
|
||||
try {
|
||||
dispatch(new RemoveIncidentUpdateCommand($update));
|
||||
|
||||
Reference in New Issue
Block a user