Best laravel framework open-source packages.

Laravel paddle

DEPRECATED - USE https://github.com/laravel/cashier-paddle
Updated 1 year ago

Laravel Paddle

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

This package was created by, and is maintained by Brian Faust, and provides a Paddle integration for Laravel.

Installation

composer require kodekeep/laravel-paddle

Usage

See our tests for usage examples.

Billable

If you are planning to use the Billable trait you'll need to use the following migration to add the necessary columns to the table of your billabled model.

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Schema;

class AddPaddleToUsers extends Migration
{
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->unsignedBigInteger('paddle_id')->nullable()->index();
            $table->unsignedBigInteger('paddle_subscription_id')->nullable()->index();
            $table->unsignedBigInteger('paddle_subscription_plan_id')->nullable()->index();
            $table->timestamp('trial_ends_at')->nullable();
            $table->timestamp('grace_period_ends_at')->nullable();
        });
    }

    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('paddle_id');
            $table->dropColumn('paddle_subscription_id');
            $table->dropColumn('paddle_subscription_plan_id');
            $table->dropColumn('trial_ends_at');
            $table->dropColumn('grace_period_ends_at');
        });
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover a security vulnerability within this package, please send an e-mail to hello@kodekeep.com. All security vulnerabilities will be promptly addressed.

Credits

This project exists thanks to all the people who contribute.

Support Us

We invest a lot of resources into creating and maintaining our packages. You can support us and the development through GitHub Sponsors.

License

Laravel Paddle is an open-sourced software licensed under the MPL-2.0.

Tags https http