Laravel Cashier
Billing is a mundane task. Many POS /billing softwares are very complex and to learn it is a tiring process. However this task cannot be avoided. Many billing systems have improved but it is not easy to set up. Laravel released a package named Cashier dedicated to make your billing process easy. All the API’s are simple and easy to understand. Cashier is an expressive, fluent interface to Stripe’s subscription billing services. Stripe is a powerful tool for internet commerce. Stripe. Cashier can handle coupons, swapping subscription, subscription quantities, cancellation grace period etc.
Installation- use composer to install.
composer require laravel/cashier
Migrations- Cashier has its own migration directory. It will add many columns to your users table and create new subscriptions tables to store your customer subscriptions.
php artisan migrate
If you want to overwrite migrations that come with the package publish them using
vender:publish artisan command.
php artisan vendor:publish --tag="cashier-migrations"
If you don’t want the migrations to run entirely you can ignore them. In AppServiceProvider go to your register method and call them.
use Laravel\Cashier\Cashier;
Cashier::ignoreMigrations();
Comments
0 comments
Please Sign in or Create an account to Post Comments