Removed redundant items, upgraded to laravel 5.6

This commit is contained in:
Deon George
2018-04-10 21:23:13 +10:00
parent 33658e37a3
commit f9e3b2927a
588 changed files with 35299 additions and 90438 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
@@ -12,61 +13,13 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [
// User Related Events...
'Laravel\Spark\Events\Auth\UserRegistered' => [
'Laravel\Spark\Listeners\Subscription\CreateTrialEndingNotification',
],
'Laravel\Spark\Events\Subscription\UserSubscribed' => [
'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
'Laravel\Spark\Listeners\Subscription\UpdateTrialEndingDate',
],
'Laravel\Spark\Events\Profile\ContactInformationUpdated' => [
'Laravel\Spark\Listeners\Profile\UpdateContactInformationOnStripe',
],
'Laravel\Spark\Events\PaymentMethod\VatIdUpdated' => [
'Laravel\Spark\Listeners\Subscription\UpdateTaxPercentageOnStripe',
],
'Laravel\Spark\Events\PaymentMethod\BillingAddressUpdated' => [
'Laravel\Spark\Listeners\Subscription\UpdateTaxPercentageOnStripe',
],
'Laravel\Spark\Events\Subscription\SubscriptionUpdated' => [
'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
],
'Laravel\Spark\Events\Subscription\SubscriptionCancelled' => [
'Laravel\Spark\Listeners\Subscription\UpdateActiveSubscription',
],
// Team Related Events...
'Laravel\Spark\Events\Teams\TeamCreated' => [
'Laravel\Spark\Listeners\Teams\Subscription\CreateTrialEndingNotification',
],
'Laravel\Spark\Events\Teams\Subscription\TeamSubscribed' => [
'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
'Laravel\Spark\Listeners\Teams\Subscription\UpdateTrialEndingDate',
],
'Laravel\Spark\Events\Teams\Subscription\SubscriptionUpdated' => [
'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
],
'Laravel\Spark\Events\Teams\Subscription\SubscriptionCancelled' => [
'Laravel\Spark\Listeners\Teams\Subscription\UpdateActiveSubscription',
],
'Laravel\Spark\Events\Teams\UserInvitedToTeam' => [
'Laravel\Spark\Listeners\Teams\CreateInvitationNotification',
'App\Events\Event' => [
'App\Listeners\EventListener',
],
];
/**
* Register any other events for your application.
* Register any events for your application.
*
* @return void
*/

View File

@@ -2,7 +2,7 @@
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
@@ -31,14 +31,13 @@ class RouteServiceProvider extends ServiceProvider
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
public function map()
{
$this->mapWebRoutes($router);
$this->mapApiRoutes();
$this->mapApiRoutes($router);
$this->mapWebRoutes();
//
}
@@ -48,32 +47,27 @@ class RouteServiceProvider extends ServiceProvider
*
* These routes all receive session state, CSRF protection, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
protected function mapWebRoutes(Router $router)
protected function mapWebRoutes()
{
$router->group([
'namespace' => $this->namespace, 'middleware' => ['web', 'hasTeam'],
], function ($router) {
require base_path('routes/web.php');
});
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* @param \Illuminate\Routing\Router $router
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes(Router $router)
protected function mapApiRoutes()
{
$router->group([
'namespace' => $this->namespace,
'middleware' => 'api',
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}

View File

@@ -1,66 +0,0 @@
<?php
namespace App\Providers;
use Laravel\Spark\Spark;
use Laravel\Spark\Providers\AppServiceProvider as ServiceProvider;
class SparkServiceProvider extends ServiceProvider
{
/**
* Your application and company details.
*
* @var array
*/
protected $details = [
'vendor' => 'Your Company',
'product' => 'Your Product',
'street' => 'PO Box 111',
'location' => 'Your Town, NY 12345',
'phone' => '555-555-5555',
];
/**
* The address where customer support e-mails should be sent.
*
* @var string
*/
protected $sendSupportEmailsTo = null;
/**
* All of the application developer e-mail addresses.
*
* @var array
*/
protected $developers = [
//
];
/**
* Indicates if the application will expose an API.
*
* @var bool
*/
protected $usesApi = true;
/**
* Finish configuring Spark for the application.
*
* @return void
*/
public function booted()
{
Spark::useStripe()->noCardUpFront()->trialDays(10);
Spark::freePlan()
->features([
'First', 'Second', 'Third'
]);
Spark::plan('Basic', 'provider-id-1')
->price(10)
->features([
'First', 'Second', 'Third'
]);
}
}