Download the PHP package ridho/justsubs without Composer

On this page you can find all versions of the php package ridho/justsubs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package justsubs

JustSubs Logo

JustSubs

JustSubs is a solid, self-hosted subscription and billing infrastructure package for Laravel applications. It abstracts away the complexity of managing plans, polymorphic subscriptions, invoices, and payment processing while providing a built-in, standalone Tailwind CSS dashboard.

Features

Requirements

Installation

You can install the package via composer:

Publish the package configuration, migrations, and dashboard assets:

Run the database migrations:

Configuration

After running the install command, you can modify the configuration file located at config/justsubs.php. Here you can change the table names (to prevent collisions with packages like Laravel Cashier) and customize the dashboard route prefix (defaults to /justsubs).

Dashboard Authorization

By default, the dashboard is only accessible in the local environment. To authorize users in production, register an authorization callback within the boot method of your App\Providers\AppServiceProvider.

Because it uses a closure, you have total freedom to define who gets access. Here are a few common examples:

1. Using an array of emails (Horizon style)

2. Using a Roles package (e.g. Spatie)

3. Using Laravel Gates

Since JustSubs uses Polymorphic subscribers, you can also define how to display the subscriber's name in the dashboard:

Adding HasSubscriptions

Add the HasSubscriptions trait to the Eloquent model that will be acting as the subscriber (e.g., your User or Team model).

Creating Plans

Plans can be created easily via the built-in Dashboard or programmatically using Eloquent.

Creating Subscriptions

To subscribe a user to a plan, use the SubscriptionManager service. Note that overlapping active subscriptions are blocked by default.

To check subscription status on your subscriber model:

Renewing

Subscriptions can be renewed via the dashboard or code. If the subscription is currently active, the renewal preserves the remaining time by adding the interval to the current ends_at. If it has expired, it restarts from now().

You can also manually extend a subscription (e.g. compensating a user for downtime):

Cancelling

You can cancel a subscription gracefully (access remains until the period ends) or immediately.

Invoices

To issue a bill for a new or existing subscription, use the BillingManager. This creates a collision-safe invoice number (e.g., INV-202608-00001).

Manual Payments

If a user pays via bank transfer or outside a gateway, you can mark the invoice as paid. This process automatically activates or renews the linked subscription safely inside a database transaction.

This can also be done visually by clicking "Mark as Paid (Manual)" on the Invoice Dashboard.

Dashboard

Navigate to your application's /justsubs URI to access the dashboard. It includes:

Events

JustSubs dispatches eloquent events you can listen to in order to send emails or run webhook synchronizations:

Payment Driver Extension

JustSubs operates on a flexible PaymentDriver contract. You can integrate Midtrans, Stripe, or Xendit by extending the registry without modifying core code.

  1. Implement \Ridho\JustSubs\Contracts\PaymentDriver.
  2. Register it in your AppServiceProvider:

Testing

The test suite spans across unit tests and HTTP feature tests, enforcing behavior with SQLite memory databases. All operations check for Race Conditions, Type Casting, and Duplicate Subscriptions.

Security

If you discover any security related issues, please create an issue or contact the author directly. Do not expose vulnerability details openly on public trackers. Built-in securities:

Upgrade Notes

No prior versions exist. The first release candidate is v0.1.0. Wait for the 1.0.0 battle-tested release before massive production adoption.

License

The MIT License (MIT).

Contributing

If you wish to contribute to JustSubs, you can run the following commands to ensure your code meets the quality gate requirements:


All versions of justsubs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ridho/justsubs contains the following files

Loading the files please wait ...