定制 bpocallaghan/subscriptions 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bpocallaghan/subscriptions

最新稳定版本:0.0.2

Composer 安装命令:

composer require bpocallaghan/subscriptions

包简介

Add Subscription Plans to your laravel admin project - https://github.com/bpocallaghan/laravel-admin-starter

README 文档

README

This will add Subscription Plans to your laravel project. Create the plan and his features for the user to register to. You can add many features and update the feature's order.

Installation

Update your project's composer.json file.

composer require bpocallaghan/subscriptions

Usage

Register the routes in the routes/vendor.php file.

  • Website
Route::resource('pricing', 'Subscriptions\Controllers\Website\SubscriptionsController');
  • Admin
Route::group(['prefix' => 'settings', 'namespace' => 'Subscriptions\Controllers\Admin'],
	function () {
		Route::resource('subscription-plans/features', 'FeaturesController');
		Route::resource('subscription-plans', 'SubscriptionPlansController');
		Route::get('subscription-plans/{subscription_plan}/features/order',
			'SubscriptionPlansController@showFeaturesOrder');
		Route::post('subscription-plans/{subscription_plan}/features/order',
			'SubscriptionPlansController@updateFeaturesOrder');
	});

Commands

php artisan subscriptions:publish

This will copy the database/seeds and database/migrations to your application. Remember to add $this->call(SubscriptionPlanFeaturesSeeder::class); $this->call(SubscriptionPlanTableSeeder::class); in the DatabaseSeeder.php

php artisan subscriptions:publish --files=all

This will copy the models, views and controllers to their respective directories. Please note when you execute the above command. You need to update your routes.

  • Website
Route::get('/pricing', 'SubscriptionsController@index');
  • Admin
Route::group(['namespace' => 'Subscriptions'], function () {
	Route::resource('subscription-plans/features', 'FeaturesController');
	Route::resource('subscription-plans', 'SubscriptionPlansController');
	Route::get('subscription-plans/{subscription_plan}/features/order',
		'SubscriptionPlansController@showFeaturesOrder');
	Route::post('subscription-plans/{subscription_plan}/features/order',
		'SubscriptionPlansController@updateFeaturesOrder');
});

Demo

Package is being used at Laravel Admin Starter project.

TODO

  • add the navigation seeder information (to create the navigation/urls)

统计信息

  • 总下载量: 4.22k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-02