Rename controller methods following Laravel's resource controllers

This commit is contained in:
James Brooks
2017-07-26 08:31:11 -04:00
parent daeadc0e52
commit 85c10f1436
10 changed files with 116 additions and 106 deletions

View File

@@ -0,0 +1,37 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriptionCommand;
use CachetHQ\Cachet\Models\Subscription;
/**
* This is the subscription controller class.
*
* @author James Brooks <james@alt-three.com>
*/
class SubscriptionController extends AbstractApiController
{
/**
* Delete a subscription.
*
* @param \CachetHQ\Cachet\Models\Subscription $subscription
*
* @return \Illuminate\Http\JsonResponse
*/
public function destroy(Subscription $subscription)
{
dispatch(new UnsubscribeSubscriptionCommand($subscription));
return $this->noContent();
}
}