Skip to content

Commit

Permalink
changed namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mansi1695 committed Feb 2, 2024
1 parent 8f221b5 commit 13b88b2
Show file tree
Hide file tree
Showing 49 changed files with 172 additions and 172 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
## [UNRELEASED]

### Added
- Now the subscription returned by the `subscription()` method in the `PlanSubscriber` trait is resolved by a class compatible with `Czechbox\LaravelPlans\Contracts\SubscriptionResolverInterface`. Default resolver is `Czechbox\LaravelPlans\SubscriptionResolver`. Behavior and logic not changed. [Documentation](https://laraplans.readthedocs.io/en/latest/usage.html#subscription-resolving).
- Now the subscription returned by the `subscription()` method in the `PlanSubscriber` trait is resolved by a class compatible with `Concept\LaravelPlans\Contracts\SubscriptionResolverInterface`. Default resolver is `Concept\LaravelPlans\SubscriptionResolver`. Behavior and logic not changed. [Documentation](https://laraplans.readthedocs.io/en/latest/usage.html#subscription-resolving).

## [2.2.0] - 2018-02-23

Expand Down Expand Up @@ -43,7 +43,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- `SubscriptionPlanChanged` event.

### Changed
- Namespace changed from `Czechbox\LaraPlans` to `Czechbox\LaravelPlans`
- Namespace changed from `Czechbox\LaraPlans` to `Concept\LaravelPlans`

### Fixed
- Fix #18
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "czechbox/laravelplans",
"name": "mansi1695/laravelplans",
"description": "SaaS style recurring plans for Laravel.",
"keywords": ["plans", "laravel", "subscriptions", "memberships"],
"license": "MIT",
Expand All @@ -18,21 +18,21 @@
},
"autoload": {
"psr-4": {
"Czechbox\\LaravelPlans\\": "src/LaravelPlans/"
"Concept\\LaravelPlans\\": "src/LaravelPlans/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
],
"psr-4": {
"Czechbox\\LaravelPlans\\Tests\\": "tests/"
"Concept\\LaravelPlans\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"Czechbox\\LaravelPlans\\LaravelPlansServiceProvider"
"Concept\\LaravelPlans\\LaravelPlansServiceProvider"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/eloquent_scopes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Eloquent Scopes

.. code-block:: php
use Czechbox\LaravelPlans\Models\PlanSubscription;
use Concept\LaravelPlans\Models\PlanSubscription;
// Get subscriptions by plan:
$subscriptions = PlanSubscription::byPlan($plan_id)->get();
Expand Down
8 changes: 4 additions & 4 deletions docs/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Events

The following are the events fired by the package:

- ``Czechbox\LaravelPlans\Events\SubscriptionCreated``: Fired when a subscription is created.
- ``Czechbox\LaravelPlans\Events\SubscriptionRenewed``: Fired when a subscription is renewed using the ``renew()`` method.
- ``Czechbox\LaravelPlans\Events\SubscriptionCanceled``: Fired when a subscription is canceled using the ``cancel()`` method.
- ``Czechbox\LaravelPlans\Events\SubscriptionPlanChanged``: Fired when a subscription's plan is changed; it will be fired once the ``PlanSubscription`` model is saved. Plan change is determined by comparing the original and current value of ``plan_id``.
- ``Concept\LaravelPlans\Events\SubscriptionCreated``: Fired when a subscription is created.
- ``Concept\LaravelPlans\Events\SubscriptionRenewed``: Fired when a subscription is renewed using the ``renew()`` method.
- ``Concept\LaravelPlans\Events\SubscriptionCanceled``: Fired when a subscription is canceled using the ``cancel()`` method.
- ``Concept\LaravelPlans\Events\SubscriptionPlanChanged``: Fired when a subscription's plan is changed; it will be fired once the ``PlanSubscription`` model is saved. Plan change is determined by comparing the original and current value of ``plan_id``.
8 changes: 4 additions & 4 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Publish package config file and migrations with the following command:

.. code-block:: bash
php artisan vendor:publish --provider="Czechbox\LaravelPlans\LaravelPlansServiceProvider"
php artisan vendor:publish --provider="Concept\LaravelPlans\LaravelPlansServiceProvider"
Depending on your use case, you may want to adjust the published migrations. If your User model id is a 'uuid' rather than 'increments', modify the ``plan_subscriptions`` schema in ``XXXX_XX-XX_XXXXXX_create_laravelplans_tables.php`` file as below.
Expand All @@ -47,7 +47,7 @@ Then run migrations:
Traits and Contracts
--------------------

Add ``Czechbox\LaravelPlans\Traits\PlanSubscriber`` trait and ``Czechbox\LaravelPlans\Contracts\PlanSubscriberInterface`` contract to your ``User`` model.
Add ``Concept\LaravelPlans\Traits\PlanSubscriber`` trait and ``Concept\LaravelPlans\Contracts\PlanSubscriberInterface`` contract to your ``User`` model.

See the following example:

Expand All @@ -56,8 +56,8 @@ See the following example:
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Czechbox\LaravelPlans\Contracts\PlanSubscriberInterface;
use Czechbox\LaravelPlans\Traits\PlanSubscriber;
use Concept\LaravelPlans\Contracts\PlanSubscriberInterface;
use Concept\LaravelPlans\Traits\PlanSubscriber;
class User extends Authenticatable implements PlanSubscriberInterface
{
Expand Down
10 changes: 5 additions & 5 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Create a Plan

.. code-block:: php
use Czechbox\LaravelPlans\Models\Plan;
use Czechbox\LaravelPlans\Models\PlanFeature;
use Concept\LaravelPlans\Models\Plan;
use Concept\LaravelPlans\Models\PlanFeature;
$plan = Plan::create([
'name' => 'Pro',
Expand Down Expand Up @@ -46,7 +46,7 @@ First, retrieve an instance of your subscriber model, which typically will be yo
.. code-block:: php
use Auth;
use Czechbox\LaravelPlans\Models\Plan;
use Concept\LaravelPlans\Models\Plan;
$user = Auth::user();
$plan = Plan::find(1);
Expand All @@ -58,7 +58,7 @@ The first argument passed to ``newSubscription`` method should be the name of th
Subscription resolving
----------------------

When you use the ``subscription()`` method (i.e., ``$user->subscription('main')``) in the subscribable model to retrieve a subscription, you will receive the latest subscription created of the subscribable and the subscription name. For example, if you subscribe *Jane Doe* to *Free plan*, and later to *Pro plan*, LaravelPlans will return the subscription with the *Pro plan* because it is the newest subscription available. If you have a different requirement you may use your own subscription resolver by binding an implementation of ``Czechbox\LaravelPlans\Contracts\SubscriptionResolverInterface`` to the `service container`__; like so:
When you use the ``subscription()`` method (i.e., ``$user->subscription('main')``) in the subscribable model to retrieve a subscription, you will receive the latest subscription created of the subscribable and the subscription name. For example, if you subscribe *Jane Doe* to *Free plan*, and later to *Pro plan*, LaravelPlans will return the subscription with the *Pro plan* because it is the newest subscription available. If you have a different requirement you may use your own subscription resolver by binding an implementation of ``Concept\LaravelPlans\Contracts\SubscriptionResolverInterface`` to the `service container`__; like so:

.. __: https://laravel.com/docs/5.6/container#introduction

Expand Down Expand Up @@ -177,7 +177,7 @@ To renew a subscription you may use the ``renew`` method available in the subscr
.. caution::
Canceled subscriptions with an ended period can't be renewed.

``Czechbox\LaravelPlans\Events\SubscriptionRenewed`` event is fired when a subscription is renewed using the ``renew`` method.
``Concept\LaravelPlans\Events\SubscriptionRenewed`` event is fired when a subscription is renewed using the ``renew`` method.

Cancel a Subscription
---------------------
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelPlans/Contracts/PlanFeatureInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Contracts;
namespace Concept\LaravelPlans\Contracts;

interface PlanFeatureInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelPlans/Contracts/PlanInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Contracts;
namespace Concept\LaravelPlans\Contracts;

interface PlanInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelPlans/Contracts/PlanSubscriberInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Contracts;
namespace Concept\LaravelPlans\Contracts;

interface PlanSubscriberInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelPlans/Contracts/PlanSubscriptionInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Contracts;
namespace Concept\LaravelPlans\Contracts;

interface PlanSubscriptionInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Contracts;
namespace Concept\LaravelPlans\Contracts;

interface PlanSubscriptionUsageInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/LaravelPlans/Contracts/SubscriptionBuilderInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Contracts;
namespace Concept\LaravelPlans\Contracts;

interface SubscriptionBuilderInterface
{
Expand All @@ -23,7 +23,7 @@ public function skipTrial();
* Create a new subscription.
*
* @param array $options
* @return \Czechbox\LaravelPlans\Models\PlanSubscription
* @return \Concept\LaravelPlans\Models\PlanSubscription
*/
public function create(array $attributes = []);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Contracts;
namespace Concept\LaravelPlans\Contracts;

use Illuminate\Database\Eloquent\Model;

Expand Down
4 changes: 2 additions & 2 deletions src/LaravelPlans/Events/SubscriptionCanceled.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Czechbox\LaravelPlans\Events;
namespace Concept\LaravelPlans\Events;

use Czechbox\LaravelPlans\Models\PlanSubscription;
use Concept\LaravelPlans\Models\PlanSubscription;
use Illuminate\Queue\SerializesModels;

class SubscriptionCanceled
Expand Down
6 changes: 3 additions & 3 deletions src/LaravelPlans/Events/SubscriptionCreated.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Czechbox\LaravelPlans\Events;
namespace Concept\LaravelPlans\Events;

use Czechbox\LaravelPlans\Models\PlanSubscription;
use Concept\LaravelPlans\Models\PlanSubscription;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

Expand All @@ -11,7 +11,7 @@ class SubscriptionCreated
use Dispatchable, SerializesModels;

/**
* @var \Czechbox\LaravelPlans\Models\PlanSubscription
* @var \Concept\LaravelPlans\Models\PlanSubscription
*/
public $subscription;

Expand Down
8 changes: 4 additions & 4 deletions src/LaravelPlans/Events/SubscriptionPlanChanged.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?php

namespace Czechbox\LaravelPlans\Events;
namespace Concept\LaravelPlans\Events;

use Czechbox\LaravelPlans\Models\PlanSubscription;
use Concept\LaravelPlans\Models\PlanSubscription;
use Illuminate\Queue\SerializesModels;

class SubscriptionPlanChanged
{
use SerializesModels;

/**
* @var \Czechbox\LaravelPlans\Models\PlanSubscription
* @var \Concept\LaravelPlans\Models\PlanSubscription
*/
public $subscription;

/**
* Create a new event instance.
*
* @param \Czechbox\LaravelPlans\Models\PlanSubscription $subscription
* @param \Concept\LaravelPlans\Models\PlanSubscription $subscription
* @return void
*/
public function __construct(PlanSubscription $subscription)
Expand Down
8 changes: 4 additions & 4 deletions src/LaravelPlans/Events/SubscriptionRenewed.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?php

namespace Czechbox\LaravelPlans\Events;
namespace Concept\LaravelPlans\Events;

use Czechbox\LaravelPlans\Models\PlanSubscription;
use Concept\LaravelPlans\Models\PlanSubscription;
use Illuminate\Queue\SerializesModels;

class SubscriptionRenewed
{
use SerializesModels;

/**
* @var \Czechbox\LaravelPlans\Models\PlanSubscription
* @var \Concept\LaravelPlans\Models\PlanSubscription
*/
public $subscription;

/**
* Create a new event instance.
*
* @param \Czechbox\LaravelPlans\Models\PlanSubscription $subscription
* @param \Concept\LaravelPlans\Models\PlanSubscription $subscription
* @return void
*/
public function __construct(PlanSubscription $subscription)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Exceptions;
namespace Concept\LaravelPlans\Exceptions;

class FeatureValueFormatIncompatibleException extends \Exception
{
Expand Down
2 changes: 1 addition & 1 deletion src/LaravelPlans/Exceptions/InvalidIntervalException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Exceptions;
namespace Concept\LaravelPlans\Exceptions;

class InvalidIntervalException extends \Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Czechbox\LaravelPlans\Exceptions;
namespace Concept\LaravelPlans\Exceptions;

class InvalidPlanFeatureException extends \Exception
{
Expand Down
8 changes: 4 additions & 4 deletions src/LaravelPlans/Feature.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Czechbox\LaravelPlans;
namespace Concept\LaravelPlans;

use Carbon\Carbon;
use Czechbox\LaravelPlans\Period;
use Czechbox\LaravelPlans\Exceptions\InvalidPlanFeatureException;
use Concept\LaravelPlans\Period;
use Concept\LaravelPlans\Exceptions\InvalidPlanFeatureException;

class Feature
{
Expand Down Expand Up @@ -34,7 +34,7 @@ class Feature
*
* @param string $feature_code
* @return void
*@throws \Czechbox\LaravelPlans\Exceptions\InvalidPlanFeatureException
*@throws \Concept\LaravelPlans\Exceptions\InvalidPlanFeatureException
*/
public function __construct($feature_code)
{
Expand Down
18 changes: 9 additions & 9 deletions src/LaravelPlans/LaravelPlansServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace Czechbox\LaravelPlans;
namespace Concept\LaravelPlans;

use Illuminate\Support\ServiceProvider;
use Czechbox\LaravelPlans\SubscriptionBuilder;
use Czechbox\LaravelPlans\SubscriptionResolver;
use Czechbox\LaravelPlans\Contracts\PlanInterface;
use Czechbox\LaravelPlans\Contracts\PlanFeatureInterface;
use Czechbox\LaravelPlans\Contracts\PlanSubscriptionInterface;
use Czechbox\LaravelPlans\Contracts\SubscriptionBuilderInterface;
use Czechbox\LaravelPlans\Contracts\SubscriptionResolverInterface;
use Czechbox\LaravelPlans\Contracts\PlanSubscriptionUsageInterface;
use Concept\LaravelPlans\SubscriptionBuilder;
use Concept\LaravelPlans\SubscriptionResolver;
use Concept\LaravelPlans\Contracts\PlanInterface;
use Concept\LaravelPlans\Contracts\PlanFeatureInterface;
use Concept\LaravelPlans\Contracts\PlanSubscriptionInterface;
use Concept\LaravelPlans\Contracts\SubscriptionBuilderInterface;
use Concept\LaravelPlans\Contracts\SubscriptionResolverInterface;
use Concept\LaravelPlans\Contracts\PlanSubscriptionUsageInterface;

class LaravelPlansServiceProvider extends ServiceProvider
{
Expand Down
8 changes: 4 additions & 4 deletions src/LaravelPlans/Models/Plan.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Czechbox\LaravelPlans\Models;
namespace Concept\LaravelPlans\Models;

use Czechbox\LaravelPlans\Period;
use Concept\LaravelPlans\Period;
use Illuminate\Database\Eloquent\Model;
use Czechbox\LaravelPlans\Contracts\PlanInterface;
use Czechbox\LaravelPlans\Exceptions\InvalidPlanFeatureException;
use Concept\LaravelPlans\Contracts\PlanInterface;
use Concept\LaravelPlans\Exceptions\InvalidPlanFeatureException;

class Plan extends Model implements PlanInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/LaravelPlans/Models/PlanFeature.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Czechbox\LaravelPlans\Models;
namespace Concept\LaravelPlans\Models;

use Illuminate\Database\Eloquent\Model;
use Czechbox\LaravelPlans\Traits\BelongsToPlan;
use Czechbox\LaravelPlans\Contracts\PlanFeatureInterface;
use Concept\LaravelPlans\Traits\BelongsToPlan;
use Concept\LaravelPlans\Contracts\PlanFeatureInterface;

class PlanFeature extends Model implements PlanFeatureInterface
{
Expand Down
Loading

0 comments on commit 13b88b2

Please sign in to comment.