Initial Spark Install

This commit is contained in:
Deon George
2017-11-03 16:26:07 +11:00
commit b1a5807eb3
766 changed files with 128896 additions and 0 deletions

2
spark/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/node_modules
/vendor

237
spark/changes.md Normal file
View File

@@ -0,0 +1,237 @@
# Change Log
## Version 5.0.1
- Fix version property.
## Version 5.0.0
- Laravel 5.5 support.
## Version 4.0.13
- Various bug fixes.
## Version 4.0.12
- Various bug fixes.
## Version 4.0.11
- Various bug fixes.
## Version 4.0.10
- Update Vue dependencies.
## Version 4.0.9
- Fix Mix version.
## Version 4.0.8
- Fix broken VAT calculation.
## Version 4.0.7
- Fix additional `cross-env` bug.
## Version 4.0.6
- Update `cross-env` compatibility.
## Version 4.0.4
- Various bug fixes.
## Version 4.0.0
- Compatibility with Laravel 5.4.
## Version 3.0.5
- Various bug fixes.
## Version 3.0.4
- Various bug fixes.
## Version 3.0.3
- The `spark:update` command now only updates to the latest version in your major version series.
## Version 3.0.2
- Support for disabling plan change prorating.
- Properly handle trials on subscription page if user has never subscribed before.
## Version 3.0.1
- Various Bug Fixes
## Version 3.0.0
- Update to Vue 2.0
## Version 2.0.4
- Revert Vue Resource upgrade.
## Version 2.0.3
- Update Vue Resource and JWT libraries.
## Version 2.0.0
- Compatibility with Laravel 5.3
## Version 1.0.14
- Various minor bug fixes.
## Version 1.0.13
- Various minor bug fixes.
## Version 1.0.12
- Various improvements to notifications.
- Allow full state names in billing information instead of just abbreviations.
## Version 1.0.11
- Remove empty parentheses on "delete announcement" modal.
- Fix notifications overflow.
## Version 1.0.10
- Fix relative date formatting.
## Version 1.0.9
- Fix various bugs.
## Version 1.0.8
- Fix typo in class name.
- Constrain Vue packages tighter.
## Version 1.0.7
- Stringify a few forms before handing them to vue-resource.
## Version 1.0.6
- Fix calculation of revenue when using subscription quantities.
- Return result of interactions from base controller.
## Version 1.0.5
- Fix HTTP calls with new `vue-resource` updates.
## Version 1.0.4
- Use `SPARK_PATH` in `UpdateInstallation` class.
- Update Blade layout to use same global script logic as Vue layout.
- Fix `TokenGuard` to allow API authentication to work with `actingAs` during testing.
- Fix responsiveness of update subscription screen.
## Version 1.0.3
- Fix closing tag of metrics Vue component.
## Version 1.0.2
- Lower case e-mail before calling Gravatar.
- Import Closure into `CallsInteractions`.
## Version 1.0.1
- Check for existing invoice by ID before storing local database record.
## Version 1.0.0
- Fix infinite redirect when using `Spark::promotion`.
## Version 0.1.19
- Fix CSRF verification bug in two-factor authentication when "remember me" is checked.
## Version 0.1.18
- Fix JWT import for some PHP versions.
## Version 0.1.17
- Fix token regression from last release.
## Version 0.1.16
- Convert transient API tokens to use JWT instead of storing in database.
- Remove unnecessary methods in TokenRepository.
- Reset "Assign All Abilities" button after creating an API token.
**After installing this update you should `composer update` and verify that the `firebase/php-jwt` package has been installed for your application.**
## Version 0.1.15
- Fix double encryption of API token cookies in TokenController.
## Version 0.1.14
- Fix file uploads in Firefox.
## Version 0.1.13
- Fix links to team settings pages.
## Version 0.1.12
- Check that maximum team rule is enforced when downgrading plans.
## Version 0.1.11
- Don't force `subscribe` middleware out of the box on `HomeController`.
## Version 0.1.10
- Fix link back to team overview page.
## Version 0.1.9
- Fix missing variable in team eligibility check.
## Version 0.1.8
- Fix typo on extra billing information entry screen.
## Version 0.1.7
- Throttle password reset attempts.
## Version 0.1.6
- Fix bug in subscription page redirection in JavaScript interceptors.
## Version 0.1.5
- Publish new views from Spark if they haven't been published yet.
## Version 0.1.4
- Fix coupon display bug.
## Version 0.1.3
- Added short-cuts for a few common swaps.
- Added more robust plan eligibility checking.
## Version 0.1.2
- Included `RedirectIfAuthenticated` in installation stubs.
- Added `spark:version` Artisan command.
- Added "excluding VAT" notice to all subscription screens.
- Automatically calculate VAT for customers when applicable.
- Display tax amount and total price with tax on check-out situations.
- Clean up Vue fragment components.

36
spark/composer.json Normal file
View File

@@ -0,0 +1,36 @@
{
"name": "laravel/spark",
"description": "Laravel Spark provides scaffolding for Laravel SaaS applications.",
"keywords": ["laravel", "stripe", "billing", "scaffolding", "saas"],
"license": "MIT",
"authors": [
{
"name": "Taylor Otwell",
"email": "taylorotwell@gmail.com"
}
],
"require": {
"php": ">=5.5.9",
"erusev/parsedown": "~1.0",
"firebase/php-jwt": "~3.0|~4.0",
"guzzlehttp/guzzle": "~6.0",
"ramsey/uuid": "^3.1",
"intervention/image": "^2.3"
},
"require-dev": {
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"mpociot/vat-calculator": "^1.6"
},
"autoload": {
"psr-4": {
"Laravel\\Spark\\": "src/"
}
},
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"minimum-stability": "dev"
}

1898
spark/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
// $this->middleware('subscribed');
}
/**
* Show the application dashboard.
*
* @return Response
*/
public function show()
{
return view('home');
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class WelcomeController extends Controller
{
/**
* Show the application splash screen.
*
* @return Response
*/
public function show()
{
return view('welcome');
}
}

View File

@@ -0,0 +1,61 @@
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Laravel\Spark\Http\Middleware\CreateFreshApiToken::class,
],
'api' => [
'throttle:60,1',
'bindings',
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'dev' => \Laravel\Spark\Http\Middleware\VerifyUserIsDeveloper::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'hasTeam' => \Laravel\Spark\Http\Middleware\VerifyUserHasTeam::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'subscribed' => \Laravel\Spark\Http\Middleware\VerifyUserIsSubscribed::class,
'teamSubscribed' => \Laravel\Spark\Http\Middleware\VerifyTeamIsSubscribed::class,
];
}

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
}
return $next($request);
}
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @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\UpdateContactInformationOnBraintree',
],
'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',
],
];
/**
* Register any other events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}

View File

@@ -0,0 +1,79 @@
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @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',
],
];
/**
* Register any other events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}

View File

@@ -0,0 +1,79 @@
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @return void
*/
public function boot()
{
//
parent::boot();
}
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
{
$this->mapWebRoutes($router);
$this->mapApiRoutes($router);
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
protected function mapWebRoutes(Router $router)
{
$router->group([
'namespace' => $this->namespace, 'middleware' => ['web', 'hasTeam'],
], function ($router) {
require base_path('routes/web.php');
});
}
/**
* Define the "api" routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
protected function mapApiRoutes(Router $router)
{
$router->group([
'namespace' => $this->namespace,
'middleware' => 'api',
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
}
}

View File

@@ -0,0 +1,66 @@
<?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::useBraintree()->noCardUpFront()->trialDays(10);
Spark::freePlan()
->features([
'First', 'Second', 'Third'
]);
Spark::plan('Basic', 'provider-id-1')
->price(10)
->features([
'First', 'Second', 'Third'
]);
}
}

View File

@@ -0,0 +1,66 @@
<?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::useBraintree()->noCardUpFront()->teamTrialDays(10);
Spark::freeTeamPlan()
->features([
'First', 'Second', 'Third'
]);
Spark::teamPlan('Basic', 'provider-id-1')
->price(10)
->features([
'First', 'Second', 'Third'
]);
}
}

View File

@@ -0,0 +1,66 @@
<?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'
]);
}
}

View File

@@ -0,0 +1,66 @@
<?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()->teamTrialDays(10);
Spark::freeTeamPlan()
->features([
'First', 'Second', 'Third'
]);
Spark::teamPlan('Basic', 'provider-id-1')
->price(10)
->features([
'First', 'Second', 'Third'
]);
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace App;
use Laravel\Spark\Team as SparkTeam;
class Team extends SparkTeam
{
//
}

View File

@@ -0,0 +1,53 @@
<?php
namespace App;
use Laravel\Spark\CanJoinTeams;
use Laravel\Spark\User as SparkUser;
class User extends SparkUser
{
use CanJoinTeams;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'email',
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [
'password',
'remember_token',
'authy_id',
'country_code',
'phone',
'card_brand',
'card_last_four',
'card_country',
'billing_address',
'billing_address_line_2',
'billing_city',
'billing_zip',
'billing_country',
'extra_billing_information',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'trial_ends_at' => 'datetime',
'uses_two_factor_auth' => 'boolean',
];
}

View File

@@ -0,0 +1,50 @@
<?php
namespace App;
use Laravel\Spark\User as SparkUser;
class User extends SparkUser
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'email',
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [
'password',
'remember_token',
'authy_id',
'country_code',
'phone',
'card_brand',
'card_last_four',
'card_country',
'billing_address',
'billing_address_line_2',
'billing_city',
'billing_zip',
'billing_country',
'extra_billing_information',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'trial_ends_at' => 'datetime',
'uses_two_factor_auth' => 'boolean',
];
}

View File

@@ -0,0 +1,106 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'spark',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| Here you may set the options for resetting passwords including the view
| that is your password reset e-mail. You may also set the name of the
| table that maintains all of the reset tokens for your application.
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'email' => 'spark::auth.emails.password',
'table' => 'password_resets',
'expire' => 60,
],
],
];

View File

@@ -0,0 +1,40 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'authy' => [
'secret' => env('AUTHY_SECRET'),
],
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'braintree' => [
'model' => App\User::class,
'env' => env('BRAINTREE_ENV'),
'merchant_id' => env('BRAINTREE_MERCHANT_ID'),
'key' => env('BRAINTREE_KEY'),
'secret' => env('BRAINTREE_SECRET'),
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'authy' => [
'secret' => env('AUTHY_SECRET'),
],
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
];

View File

@@ -0,0 +1,50 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSubscriptionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('subscriptions', function ($table) {
$table->increments('id');
$table->integer('user_id');
$table->string('name');
$table->string('braintree_id');
$table->string('braintree_plan');
$table->integer('quantity');
$table->timestamp('trial_ends_at')->nullable();
$table->timestamp('ends_at')->nullable();
$table->timestamps();
});
Schema::create('team_subscriptions', function ($table) {
$table->increments('id');
$table->integer('team_id');
$table->string('name');
$table->string('braintree_id');
$table->string('braintree_plan');
$table->integer('quantity');
$table->timestamp('trial_ends_at')->nullable();
$table->timestamp('ends_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('subscriptions');
Schema::drop('team_subscriptions');
}
}

View File

@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTeamsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('teams', function (Blueprint $table) {
$table->increments('id');
$table->integer('owner_id')->index();
$table->string('name');
$table->string('slug')->nullable()->unique();
$table->text('photo_url')->nullable();
$table->string('braintree_id')->nullable();
$table->string('current_billing_plan')->nullable();
$table->string('paypal_email')->nullable();
$table->string('card_brand')->nullable();
$table->string('card_last_four')->nullable();
$table->text('extra_billing_information')->nullable();
$table->timestamp('trial_ends_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('teams');
}
}

View File

@@ -0,0 +1,49 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password', 60);
$table->rememberToken();
$table->text('photo_url')->nullable();
$table->tinyInteger('uses_two_factor_auth')->default(0);
$table->string('authy_id')->nullable();
$table->string('country_code', 10)->nullable();
$table->string('phone', 25)->nullable();
$table->string('two_factor_reset_code', 100)->nullable();
$table->integer('current_team_id')->nullable();
$table->string('braintree_id')->nullable();
$table->string('current_billing_plan')->nullable();
$table->string('paypal_email')->nullable();
$table->string('card_brand')->nullable();
$table->string('card_last_four')->nullable();
$table->text('extra_billing_information')->nullable();
$table->timestamp('trial_ends_at')->nullable();
$table->timestamp('last_read_announcements_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnnouncementsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('announcements', function (Blueprint $table) {
$table->string('id')->primary();
$table->integer('user_id');
$table->text('body');
$table->string('action_text')->nullable();
$table->text('action_url')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('announcements');
}
}

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateApiTokensTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('api_tokens', function (Blueprint $table) {
$table->string('id')->primary();
$table->integer('user_id');
$table->string('name');
$table->string('token', 100)->unique();
$table->text('metadata');
$table->tinyInteger('transient')->default(0);
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamps();
$table->index(['user_id', 'expires_at']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('api_tokens');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInvitationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('invitations', function (Blueprint $table) {
$table->string('id')->primary();
$table->integer('team_id')->index();
$table->integer('user_id')->nullable()->index();
$table->string('email');
$table->string('token', 40)->unique();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('invitations');
}
}

View File

@@ -0,0 +1,42 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInvoicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('invoices', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->nullable()->index();
$table->integer('team_id')->nullable()->index();
$table->string('provider_id');
$table->decimal('total')->nullable();
$table->decimal('tax')->nullable();
$table->string('card_country')->nullable();
$table->string('billing_state')->nullable();
$table->string('billing_zip')->nullable();
$table->string('billing_country')->nullable();
$table->string('vat_id', 50)->nullable();
$table->timestamps();
$table->index('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('invoices');
}
}

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNotificationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('notifications', function (Blueprint $table) {
$table->string('id')->primary();
$table->integer('user_id');
$table->integer('created_by')->nullable();
$table->string('icon', 50)->nullable();
$table->text('body');
$table->string('action_text')->nullable();
$table->text('action_url')->nullable();
$table->tinyInteger('read')->default(0);
$table->timestamps();
$table->index(['user_id', 'created_at']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('notifications');
}
}

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token')->index();
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePerformanceIndicatorsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('performance_indicators', function (Blueprint $table) {
$table->increments('id');
$table->decimal('monthly_recurring_revenue');
$table->decimal('yearly_recurring_revenue');
$table->decimal('daily_volume');
$table->integer('new_users');
$table->timestamps();
$table->index('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('performance_indicators');
}
}

View File

@@ -0,0 +1,50 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSubscriptionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('subscriptions', function ($table) {
$table->increments('id');
$table->integer('user_id');
$table->string('name');
$table->string('stripe_id');
$table->string('stripe_plan');
$table->integer('quantity');
$table->timestamp('trial_ends_at')->nullable();
$table->timestamp('ends_at')->nullable();
$table->timestamps();
});
Schema::create('team_subscriptions', function ($table) {
$table->increments('id');
$table->integer('team_id');
$table->string('name');
$table->string('stripe_id');
$table->string('stripe_plan');
$table->integer('quantity');
$table->timestamp('trial_ends_at')->nullable();
$table->timestamp('ends_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('subscriptions');
Schema::drop('team_subscriptions');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTeamUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('team_users', function (Blueprint $table) {
$table->integer('team_id');
$table->integer('user_id');
$table->string('role', 20);
$table->unique(['team_id', 'user_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('team_users');
}
}

View File

@@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTeamsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('teams', function (Blueprint $table) {
$table->increments('id');
$table->integer('owner_id')->index();
$table->string('name');
$table->string('slug')->nullable()->unique();
$table->text('photo_url')->nullable();
$table->string('stripe_id')->nullable();
$table->string('current_billing_plan')->nullable();
$table->string('card_brand')->nullable();
$table->string('card_last_four')->nullable();
$table->string('card_country')->nullable();
$table->string('billing_address')->nullable();
$table->string('billing_address_line_2')->nullable();
$table->string('billing_city')->nullable();
$table->string('billing_state')->nullable();
$table->string('billing_zip', 25)->nullable();
$table->string('billing_country', 2)->nullable();
$table->string('vat_id', 50)->nullable();
$table->text('extra_billing_information')->nullable();
$table->timestamp('trial_ends_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('teams');
}
}

View File

@@ -0,0 +1,56 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password', 60);
$table->rememberToken();
$table->text('photo_url')->nullable();
$table->tinyInteger('uses_two_factor_auth')->default(0);
$table->string('authy_id')->nullable();
$table->string('country_code', 10)->nullable();
$table->string('phone', 25)->nullable();
$table->string('two_factor_reset_code', 100)->nullable();
$table->integer('current_team_id')->nullable();
$table->string('stripe_id')->nullable();
$table->string('current_billing_plan')->nullable();
$table->string('card_brand')->nullable();
$table->string('card_last_four')->nullable();
$table->string('card_country')->nullable();
$table->string('billing_address')->nullable();
$table->string('billing_address_line_2')->nullable();
$table->string('billing_city')->nullable();
$table->string('billing_state')->nullable();
$table->string('billing_zip', 25)->nullable();
$table->string('billing_country', 2)->nullable();
$table->string('vat_id', 50)->nullable();
$table->text('extra_billing_information')->nullable();
$table->timestamp('trial_ends_at')->nullable();
$table->timestamp('last_read_announcements_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}

View File

@@ -0,0 +1,23 @@
{
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"dependencies": {
"bootstrap": "^3.0.0",
"jquery": "^2.1.4",
"js-cookie": "^2.1.0",
"cross-env": "^3.2.3",
"laravel-mix": "0.*",
"moment": "^2.10.6",
"promise": "^7.1.1",
"sweetalert": "^1.1.3",
"underscore": "^1.8.3",
"urijs": "^1.17.0",
"vue": "2.*",
"axios": "^0.15.2"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -0,0 +1,23 @@
/*
|--------------------------------------------------------------------------
| Laravel Spark Bootstrap
|--------------------------------------------------------------------------
|
| First, we will load all of the "core" dependencies for Spark which are
| libraries such as Vue and jQuery. This also loads the Spark helpers
| for things such as HTTP calls, forms, and form validation errors.
|
| Next, we'll create the root Vue application for Spark. This will start
| the entire application and attach it to the DOM. Of course, you may
| customize this script as you desire and load your own components.
|
*/
require('spark-bootstrap');
require('./components/bootstrap');
var app = new Vue({
mixins: [require('spark')]
});

View File

@@ -0,0 +1,14 @@
/*
|--------------------------------------------------------------------------
| Laravel Spark Components
|--------------------------------------------------------------------------
|
| Here we will load the Spark components which makes up the core client
| application. This is also a convenient spot for you to load all of
| your components that you write while building your applications.
*/
require('./../spark-components/bootstrap');
require('./home');

View File

@@ -0,0 +1,7 @@
Vue.component('home', {
props: ['user'],
mounted() {
//
}
});

View File

@@ -0,0 +1,5 @@
var base = require('auth/register-braintree');
Vue.component('spark-register-braintree', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('auth/register-stripe');
Vue.component('spark-register-stripe', {
mixins: [base]
});

View File

@@ -0,0 +1,92 @@
/**
* Layout Components...
*/
require('./navbar/navbar');
require('./notifications/notifications');
/**
* Authentication Components...
*/
require('./auth/register-stripe');
require('./auth/register-braintree');
/**
* Settings Component...
*/
require('./settings/settings');
/**
* Profile Settings Components...
*/
require('./settings/profile');
require('./settings/profile/update-profile-photo');
require('./settings/profile/update-contact-information');
/**
* Teams Settings Components...
*/
require('./settings/teams');
require('./settings/teams/create-team');
require('./settings/teams/pending-invitations');
require('./settings/teams/current-teams');
require('./settings/teams/team-settings');
require('./settings/teams/team-profile');
require('./settings/teams/update-team-photo');
require('./settings/teams/update-team-name');
require('./settings/teams/team-membership');
require('./settings/teams/send-invitation');
require('./settings/teams/mailed-invitations');
require('./settings/teams/team-members');
/**
* Security Settings Components...
*/
require('./settings/security');
require('./settings/security/update-password');
require('./settings/security/enable-two-factor-auth');
require('./settings/security/disable-two-factor-auth');
/**
* API Settings Components...
*/
require('./settings/api');
require('./settings/api/create-token');
require('./settings/api/tokens');
/**
* Subscription Settings Components...
*/
require('./settings/subscription');
require('./settings/subscription/subscribe-stripe');
require('./settings/subscription/subscribe-braintree');
require('./settings/subscription/update-subscription');
require('./settings/subscription/resume-subscription');
require('./settings/subscription/cancel-subscription');
/**
* Payment Method Components...
*/
require('./settings/payment-method-stripe');
require('./settings/payment-method-braintree');
require('./settings/payment-method/update-vat-id');
require('./settings/payment-method/update-payment-method-stripe');
require('./settings/payment-method/update-payment-method-braintree');
require('./settings/payment-method/redeem-coupon');
/**
* Billing History Components...
*/
require('./settings/invoices');
require('./settings/invoices/update-extra-billing-information');
require('./settings/invoices/invoice-list');
/**
* Kiosk Components...
*/
require('./kiosk/kiosk');
require('./kiosk/announcements');
require('./kiosk/metrics');
require('./kiosk/users');
require('./kiosk/profile');
require('./kiosk/add-discount');

View File

@@ -0,0 +1,5 @@
var base = require('kiosk/add-discount');
Vue.component('spark-kiosk-add-discount', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('kiosk/announcements');
Vue.component('spark-kiosk-announcements', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('kiosk/kiosk');
Vue.component('spark-kiosk', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('kiosk/metrics');
Vue.component('spark-kiosk-metrics', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('kiosk/profile');
Vue.component('spark-kiosk-profile', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('kiosk/users');
Vue.component('spark-kiosk-users', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('navbar/navbar');
Vue.component('spark-navbar', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('notifications/notifications');
Vue.component('spark-notifications', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/api');
Vue.component('spark-api', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/api/create-token');
Vue.component('spark-create-token', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/api/tokens');
Vue.component('spark-tokens', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/invoices');
Vue.component('spark-invoices', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/invoices/invoice-list');
Vue.component('spark-invoice-list', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/invoices/update-extra-billing-information');
Vue.component('spark-update-extra-billing-information', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/payment-method-braintree');
Vue.component('spark-payment-method-braintree', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/payment-method-stripe');
Vue.component('spark-payment-method-stripe', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/payment-method/redeem-coupon');
Vue.component('spark-redeem-coupon', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/payment-method/update-payment-method-braintree');
Vue.component('spark-update-payment-method-braintree', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/payment-method/update-payment-method-stripe');
Vue.component('spark-update-payment-method-stripe', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/payment-method/update-vat-id');
Vue.component('spark-update-vat-id', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/profile');
Vue.component('spark-profile', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/profile/update-contact-information');
Vue.component('spark-update-contact-information', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/profile/update-profile-photo');
Vue.component('spark-update-profile-photo', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/security');
Vue.component('spark-security', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/security/disable-two-factor-auth');
Vue.component('spark-disable-two-factor-auth', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/security/enable-two-factor-auth');
Vue.component('spark-enable-two-factor-auth', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/security/update-password');
Vue.component('spark-update-password', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/settings');
Vue.component('spark-settings', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/subscription');
Vue.component('spark-subscription', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/subscription/cancel-subscription');
Vue.component('spark-cancel-subscription', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/subscription/resume-subscription');
Vue.component('spark-resume-subscription', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/subscription/subscribe-braintree');
Vue.component('spark-subscribe-braintree', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/subscription/subscribe-stripe');
Vue.component('spark-subscribe-stripe', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/subscription/update-subscription');
Vue.component('spark-update-subscription', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams');
Vue.component('spark-teams', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/create-team');
Vue.component('spark-create-team', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/current-teams');
Vue.component('spark-current-teams', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/mailed-invitations');
Vue.component('spark-mailed-invitations', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/pending-invitations');
Vue.component('spark-pending-invitations', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/send-invitation');
Vue.component('spark-send-invitation', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/team-members');
Vue.component('spark-team-members', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/team-membership');
Vue.component('spark-team-membership', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/team-profile');
Vue.component('spark-team-profile', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/team-settings');
Vue.component('spark-team-settings', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/update-team-name');
Vue.component('spark-update-team-name', {
mixins: [base]
});

View File

@@ -0,0 +1,5 @@
var base = require('settings/teams/update-team-photo');
Vue.component('spark-update-team-photo', {
mixins: [base]
});

View File

@@ -0,0 +1,4 @@
@import "./../../../node_modules/bootstrap/less/bootstrap";
// @import "./spark/spark";
@import "./../../../vendor/laravel/spark/resources/assets/less/spark";

View File

@@ -0,0 +1,118 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute must be accepted.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'alpha' => 'The :attribute may only contain letters.',
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
'alpha_num' => 'The :attribute may only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'country' => 'The :attribute field is not a valid country.',
'date' => 'The :attribute is not a valid date.',
'date_format' => 'The :attribute does not match the format :format.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.',
'exists' => 'The selected :attribute is invalid.',
'filled' => 'The :attribute field is required.',
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'json' => 'The :attribute must be a valid JSON string.',
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.',
],
'mimes' => 'The :attribute must be a file of type: :values.',
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
'not_in' => 'The selected :attribute is invalid.',
'numeric' => 'The :attribute must be a number.',
'present' => 'The :attribute field must be present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values is present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.',
'size' => [
'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'state' => 'This state is not valid for the specified country.',
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.',
'url' => 'The :attribute format is invalid.',
'vat_id' => 'This VAT identification number is invalid.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => [
'team' => Spark::teamString()
],
];

View File

@@ -0,0 +1,20 @@
@extends('spark::layouts.app')
@section('content')
<home :user="user" inline-template>
<div class="container">
<!-- Application Dashboard -->
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Dashboard</div>
<div class="panel-body">
Your application's dashboard.
</div>
</div>
</div>
</div>
</div>
</home>
@endsection

View File

@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta Information -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title', config('app.name'))</title>
<!-- Fonts -->
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600' rel='stylesheet' type='text/css'>
<style>
body, html {
background: url('/img/spark-bg.png');
background-repeat: repeat;
background-size: 300px 200px;
height: 100%;
margin: 0;
}
.full-height {
min-height: 100%;
}
.flex-column {
display: flex;
flex-direction: column;
}
.flex-fill {
flex: 1;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.text-center {
text-align: center;
}
.links {
padding: 1em;
text-align: right;
}
.links a {
text-decoration: none;
}
.links button {
background-color: #3097D1;
border: 0;
border-radius: 4px;
color: white;
cursor: pointer;
font-family: 'Open Sans';
font-size: 14px;
font-weight: 600;
padding: 15px;
text-transform: uppercase;
width: 100px;
}
</style>
</head>
<body>
<div class="full-height flex-column">
<nav class="links">
<a href="/login" style="margin-right: 15px;">
<button>
Login
</button>
</a>
<a href="/register">
<button>
Register
</button>
</a>
</nav>
<div class="flex-fill flex-center">
<h1 class="text-center">
<img src="/img/color-logo.png">
</h1>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,18 @@
<?php
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register the API routes for your application as
| the routes are automatically authenticated using the API guard and
| loaded automatically by this application's RouteServiceProvider.
|
*/
Route::group([
'middleware' => 'auth:api'
], function () {
//
});

Some files were not shown because too many files have changed in this diff Show More