mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-30 07:44:41 +00:00
frontend & backend update
This commit is contained in:
@@ -56,13 +56,21 @@ Route::group(['middleware' => ['auth:api', 'auth.master', 'scope:master']], func
|
||||
Route::patch('/user/relationships/settings', 'User\AccountController@update_user_settings');
|
||||
Route::post('/user/password', 'User\AccountController@change_password');
|
||||
Route::patch('/user/profile', 'User\AccountController@update_profile');
|
||||
Route::get('/user/subscription', 'User\SubscriptionController@show');
|
||||
Route::get('/user/invoices', 'User\AccountController@invoices');
|
||||
Route::get('/user/storage', 'User\AccountController@storage');
|
||||
Route::get('/user', 'User\AccountController@user');
|
||||
|
||||
// Payment cards
|
||||
Route::delete('/user/payment-cards/{id}', 'User\PaymentCardsController@delete');
|
||||
Route::patch('/user/payment-cards/{id}', 'User\PaymentCardsController@update');
|
||||
Route::get('/user/payments', 'User\PaymentCardsController@payment_methods');
|
||||
|
||||
// Subscription
|
||||
Route::get('/stripe/setup-intent', 'User\SubscriptionController@stripe_setup_intent');
|
||||
Route::post('/subscription/upgrade', 'User\SubscriptionController@upgrade');
|
||||
Route::post('/subscription/cancel', 'User\SubscriptionController@cancel');
|
||||
Route::post('/subscription/resume', 'User\SubscriptionController@resume');
|
||||
|
||||
// Browse
|
||||
Route::get('/participant-uploads', 'FileBrowser\BrowseController@participant_uploads');
|
||||
@@ -112,6 +120,7 @@ Route::group(['middleware' => ['auth:api', 'auth.master', 'auth.admin', 'scope:m
|
||||
Route::get('/gateways', 'Admin\GatewayController@index');
|
||||
Route::get('/gateways/{type}', 'Admin\GatewayController@show');
|
||||
Route::patch('/gateways/{type}', 'Admin\GatewayController@update');
|
||||
Route::get('/gateways/{type}/transactions', 'Admin\GatewayController@show_transactions');
|
||||
|
||||
// Plans
|
||||
Route::get('/plans', 'Admin\PlanController@index');
|
||||
|
||||
+2
-52
@@ -16,59 +16,9 @@ use Rinvex\Subscriptions\Models\PlanFeature;
|
||||
|
||||
Route::get('/debug', function () {
|
||||
|
||||
$user = User::find(1);
|
||||
|
||||
/*
|
||||
* 1. Create plan
|
||||
*/
|
||||
/* $plan = app('rinvex.subscriptions.plan')->create([
|
||||
'name' => 'Starter Pack',
|
||||
'description' => 'The best for start with',
|
||||
'price' => 9.99,
|
||||
'signup_fee' => 0,
|
||||
'invoice_period' => 1,
|
||||
'invoice_interval' => 'month',
|
||||
'trial_period' => 7,
|
||||
'trial_interval' => 'day',
|
||||
'sort_order' => 1,
|
||||
'currency' => 'USD',
|
||||
]);
|
||||
|
||||
// Create multiple plan features at once
|
||||
$plan->features()->saveMany([
|
||||
new PlanFeature(['name' => 'Storage capacity', 'value' => 200, 'sort_order' => 1]),
|
||||
]);
|
||||
|
||||
return $plan;
|
||||
*/
|
||||
|
||||
/*
|
||||
* 2. Get plan
|
||||
*/
|
||||
|
||||
/* $plan = app('rinvex.subscriptions.plan')->find(6);
|
||||
|
||||
return $plan;
|
||||
//return $plan->subscriptions;
|
||||
|
||||
$space = $plan->getFeatureBySlug('storage-capacity')->value;*/
|
||||
|
||||
//return $space;
|
||||
|
||||
/*
|
||||
* 3. Create subscription
|
||||
*/
|
||||
|
||||
$user = Auth::user();
|
||||
//$plan = app('rinvex.subscriptions.plan')->find(6);
|
||||
|
||||
//return $user->activeSubscriptions();
|
||||
|
||||
return $user->subscription('Starter Pack')->cancel();
|
||||
|
||||
//$user->newSubscription('Starter Pack', $plan);
|
||||
|
||||
//return $plan->subscriptions;
|
||||
//return $user->subscribedTo(5);
|
||||
return $user->subscription('main')->asStripeSubscription();
|
||||
});
|
||||
|
||||
// Deployment Webhook URL
|
||||
|
||||
Reference in New Issue
Block a user