setup wizard init

This commit is contained in:
carodej
2020-06-29 10:09:42 +02:00
parent a2dfc627a7
commit aedc98cc8b
44 changed files with 2756 additions and 866 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Laravel\Cashier\Http\Controllers\WebhookController as CashierController;
class WebhookController extends CashierController
{
/**
* Handle a cancelled customer from a Stripe subscription.
*
* @param array $payload
* @return \Symfony\Component\HttpFoundation\Response
*/
public function handleCustomerSubscriptionDeleted($payload) {
$user = User::where('stripe_id', $payload['data']['object']['customer'])->firstOrFail();
// TODO: set default capacity
$user->settings->update(['storage_capacity' => 1]);
return $this->successMethod();
}
}