Removed redundant items, upgraded to laravel 5.6
This commit is contained in:
parent
33658e37a3
commit
f9e3b2927a
@ -2,9 +2,10 @@ APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_LOG_LEVEL=debug
|
||||
APP_URL=http://localhost
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
@ -32,3 +33,7 @@ MAIL_ENCRYPTION=null
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
/storage/*.key
|
||||
/vendor
|
||||
/.idea
|
||||
/.vscode
|
||||
/.vagrant
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
@ -12,3 +13,4 @@ yarn-error.log
|
||||
.env
|
||||
.DS_Store
|
||||
storage/debugbar
|
||||
public/css/app.css
|
||||
|
@ -29,8 +29,6 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @return void
|
||||
*/
|
||||
|
@ -36,11 +36,4 @@ class LoginController extends Controller
|
||||
{
|
||||
$this->middleware('guest')->except('logout');
|
||||
}
|
||||
|
||||
public function showLoginForm()
|
||||
{
|
||||
return view('auth.login',[
|
||||
'site_social'=>[['name'=>'facebook','url'=>'#'],['name'=>'twitter','url'=>'#']],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
|
||||
@ -51,6 +52,9 @@ class RegisterController extends Controller
|
||||
'name' => 'required|string|max:255',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
'token' => 'required|doorman:email',
|
||||
'password' => 'required|min:6|confirmed',
|
||||
'terms' => 'required',
|
||||
]);
|
||||
}
|
||||
|
||||
@ -62,10 +66,25 @@ class RegisterController extends Controller
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return User::create([
|
||||
$fields = [
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
]);
|
||||
'password' => Hash::make($data['password']),
|
||||
];
|
||||
|
||||
if (config('auth.providers.users.field','email') === 'username' && isset($data['username'])) {
|
||||
$fields['username'] = $data['username'];
|
||||
}
|
||||
|
||||
try {
|
||||
Doorman::redeem($data['token'],$data['email']);
|
||||
|
||||
// @todo Want to direct or display an appropriate error message (although the form validation does it anyway).
|
||||
} catch (DoormanException $e) {
|
||||
redirect('/error');
|
||||
abort(403);
|
||||
}
|
||||
|
||||
return User::create($fields);
|
||||
}
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
<?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',[
|
||||
'page_title'=>'Dashboard',
|
||||
]);
|
||||
}
|
||||
}
|
@ -1,139 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Lipsum;
|
||||
|
||||
class WelcomeController extends Controller
|
||||
{
|
||||
private $cachetime = 86400;
|
||||
|
||||
private function _sample_data() {
|
||||
return [
|
||||
'site_aboutus'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
|
||||
'site_address'=>'1 Road Street,<br>Town or City, State, Postcode<br>Country',
|
||||
'site_description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
'site_email'=>'sales@example.com',
|
||||
'site_fax'=>'+1 234 567 8910',
|
||||
'site_logo'=>'/image/generic/150/20/fff',
|
||||
'site_phone'=>'+1 234 567 8910',
|
||||
'site_slider'=>TRUE,
|
||||
'site_social'=>[['name'=>'facebook','url'=>'#'],['name'=>'twitter','url'=>'#']],
|
||||
'site_topmenu'=>['Option1'=>['url'=>'#','name'=>'a'],'Option 2'=>['url'=>'#','name'=>'List','children'=>[['url'=>'#','name'=>'A'],['url'=>'#','name'=>'B']]]],
|
||||
'page_activity'=>[
|
||||
[
|
||||
'image_small'=>'/image/generic/150/100/fff',
|
||||
'image_large'=>'/image/generic/450/200/aaa',
|
||||
'title'=>'Title',
|
||||
'subtitle'=>'Subtitle',
|
||||
],
|
||||
[
|
||||
'image_small'=>'/image/generic/150/100/eee',
|
||||
'image_large'=>'/image/generic/650/200/999',
|
||||
'title'=>'Title',
|
||||
'subtitle'=>'Subtitle',
|
||||
],
|
||||
[
|
||||
'image_small'=>'/image/generic/150/100/ddd',
|
||||
'image_large'=>'/image/generic/850/300/888',
|
||||
'title'=>'Title',
|
||||
'subtitle'=>'Subtitle',
|
||||
],
|
||||
[
|
||||
'image_small'=>'/image/generic/150/100/ccc',
|
||||
'image_large'=>'/image/generic/450/200/777',
|
||||
'title'=>'Title',
|
||||
'subtitle'=>'Subtitle',
|
||||
],
|
||||
],
|
||||
'page_activityintro'=>'Here are some of the the things we\'ve been doing',
|
||||
'page_blockquote'=>[
|
||||
[
|
||||
'title'=>'Block Quote',
|
||||
'icon'=>'fa fa-rocket',
|
||||
'image'=>'/image/generic/150/75/ddd',
|
||||
],
|
||||
],
|
||||
'page_servicebox'=>[
|
||||
[
|
||||
'title'=>'Box 1',
|
||||
'icon'=>'fa fa-location-arrow blue',
|
||||
'image'=>'/image/generic/200/100/999',
|
||||
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
|
||||
],
|
||||
[
|
||||
'title'=>'Box 2',
|
||||
'icon'=>'fa fa-location-arrow blue',
|
||||
'image'=>'/image/generic/200/100/999',
|
||||
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
|
||||
],
|
||||
[
|
||||
'title'=>'Box 3',
|
||||
'icon'=>'fa fa-location-arrow blue',
|
||||
'image'=>'/image/generic/200/100/999',
|
||||
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
|
||||
],
|
||||
],
|
||||
'page_steps'=>[
|
||||
[
|
||||
'title'=>'Step 1',
|
||||
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
],
|
||||
[
|
||||
'title'=>'Step 2',
|
||||
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
],
|
||||
[
|
||||
'title'=>'Step 3',
|
||||
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
],
|
||||
],
|
||||
'page_tabs'=>[
|
||||
[
|
||||
'title'=>'Title #1',
|
||||
'image'=>'/image/generic/200/100/999/1.jpg',
|
||||
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
|
||||
],
|
||||
[
|
||||
'title'=>'Title #2',
|
||||
'image'=>'/image/generic/200/100/999/1.jpg',
|
||||
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
|
||||
],
|
||||
[
|
||||
'title'=>'Title #3',
|
||||
'image'=>'/image/generic/200/100/999/1.jpg',
|
||||
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
|
||||
],
|
||||
],
|
||||
'page_testimonials'=>[
|
||||
[
|
||||
'name'=>'First Last #1',
|
||||
'title'=>'Title',
|
||||
'photo'=>'/image/generic/200/100/999',
|
||||
'quote'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
],
|
||||
[
|
||||
'name'=>'First Last #2',
|
||||
'title'=>'Title',
|
||||
'photo'=>'/image/generic/200/100/333',
|
||||
'quote'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
|
||||
],
|
||||
],
|
||||
'page_title'=>'Welcome',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application splash screen.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
return view('welcome',$this->_sample_data());
|
||||
}
|
||||
}
|
@ -15,6 +15,10 @@ class Kernel extends HttpKernel
|
||||
*/
|
||||
protected $middleware = [
|
||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\App\Http\Middleware\SetSite::class,
|
||||
];
|
||||
|
||||
@ -28,10 +32,10 @@ class Kernel extends HttpKernel
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
\Laravel\Spark\Http\Middleware\CreateFreshApiToken::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
@ -51,13 +55,11 @@ class Kernel extends HttpKernel
|
||||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::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,
|
||||
'setTheme' => \Igaster\LaravelTheme\Middleware\setTheme::class,
|
||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
'theme' => \Igaster\LaravelTheme\Middleware\setTheme::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'subscribed' => \Laravel\Spark\Http\Middleware\VerifyUserIsSubscribed::class,
|
||||
'teamSubscribed' => \Laravel\Spark\Http\Middleware\VerifyTeamIsSubscribed::class,
|
||||
];
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Closure;
|
||||
use App\Models\{Site};
|
||||
use Config;
|
||||
@ -26,10 +27,15 @@ class SetSite
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
// @todo Figure out how to know if this is an API call - and deny it if it's not in the database.
|
||||
$so = NULL;
|
||||
|
||||
if (Schema::hasTable('site'))
|
||||
{
|
||||
$so = Site::where('url',$request->root())
|
||||
->orwhere('devurl',$request->root())
|
||||
// @todo With an API call, we would use ->firstorfail();
|
||||
->first();
|
||||
}
|
||||
|
||||
// If we dont exist, we'll return a fake model.
|
||||
if (! $so) {
|
||||
|
@ -15,15 +15,9 @@ class TrustProxies extends Middleware
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The current proxy header mappings.
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var array
|
||||
* @var string
|
||||
*/
|
||||
protected $headers = [
|
||||
Request::HEADER_FORWARDED => 'FORWARDED',
|
||||
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
|
||||
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
|
||||
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
|
||||
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
|
||||
];
|
||||
protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Old;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Account extends Model
|
||||
{
|
||||
protected $table = 'ab_account';
|
||||
|
||||
/**
|
||||
* The country this account belongs to
|
||||
*/
|
||||
public function country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Old\Country');
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Old;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Country extends Model
|
||||
{
|
||||
protected $table = 'ab_country';
|
||||
|
||||
/**
|
||||
* The currency this country belongs to
|
||||
*/
|
||||
public function currency()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Old\Currency');
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Old;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Currency extends Model
|
||||
{
|
||||
protected $table = 'ab_currency';
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Old;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Setup extends Model
|
||||
{
|
||||
protected $table = 'ab_setup';
|
||||
|
||||
public function getModuleConfigAttribute($value)
|
||||
{
|
||||
return unserialize($value);
|
||||
}
|
||||
|
||||
public function getSiteDetailsAttribute($value)
|
||||
{
|
||||
return unserialize(gzuncompress($value));
|
||||
}
|
||||
}
|
@ -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
|
||||
*/
|
||||
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
@ -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'
|
||||
]);
|
||||
}
|
||||
}
|
10
app/Team.php
10
app/Team.php
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Laravel\Spark\Team as SparkTeam;
|
||||
|
||||
class Team extends SparkTeam
|
||||
{
|
||||
//
|
||||
}
|
23
app/User.php
23
app/User.php
@ -10,7 +10,25 @@ class User extends Authenticatable
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* The country this user belongs to
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email', 'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* Return the country the user belongs to
|
||||
*/
|
||||
public function country()
|
||||
{
|
||||
@ -25,6 +43,9 @@ class User extends Authenticatable
|
||||
return $this->where('active',TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the user's full name
|
||||
*/
|
||||
public function getNameAttribute($value)
|
||||
{
|
||||
return $this->firstname.' '.$this->lastname;
|
||||
|
@ -1,32 +1,28 @@
|
||||
{
|
||||
"name": "laravel/laravel",
|
||||
"description": "The Laravel Framework.",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"keywords": ["framework", "laravel"],
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"php": ">=7.2.0",
|
||||
"acacha/user": "^0.2.2",
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
"clarkeash/doorman": "^2.0",
|
||||
"creativeorange/gravatar": "^1.0",
|
||||
"fideloper/proxy": "~3.3",
|
||||
"fideloper/proxy": "^4.0",
|
||||
"igaster/laravel-theme": "^2.0",
|
||||
"intervention/image": "^2.4",
|
||||
"laravel/cashier": "~7.0",
|
||||
"laravel/framework": "5.5.*",
|
||||
"laravel/spark": "*@dev",
|
||||
"laravel/tinker": "~1.0",
|
||||
"magyarjeti/laravel-lipsum": "dev-master",
|
||||
"orchestra/asset": "^3.5"
|
||||
"laravel/framework": "5.6.*",
|
||||
"laravel/tinker": "^1.0",
|
||||
"orchestra/asset": "^3.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"filp/whoops": "~2.0",
|
||||
"fzaninotto/faker": "~1.4",
|
||||
"mockery/mockery": "~1.0",
|
||||
"phpunit/phpunit": "~6.0"
|
||||
"filp/whoops": "^2.0",
|
||||
"fzaninotto/faker": "^1.4",
|
||||
"mockery/mockery": "^1.0",
|
||||
"nunomaduro/collision": "^2.0",
|
||||
"phpunit/phpunit": "^7.0"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
@ -44,7 +40,8 @@
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": []
|
||||
"dont-discover": [
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
@ -64,10 +61,6 @@
|
||||
"sort-packages": true,
|
||||
"optimize-autoloader": true
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "path",
|
||||
"url": "./spark"
|
||||
}
|
||||
]
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
||||
|
1582
composer.lock
generated
1582
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,8 @@ return [
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Laravel'),
|
||||
'name_html_long' => env('APP_NAME_HTML_LONG', '<b>Laravel</b>Application'),
|
||||
'name_html_short' => env('APP_NAME_HTML_SHORT', '<b>L</b>A'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -108,23 +110,6 @@ return [
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Logging Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log settings for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Settings: "single", "daily", "syslog", "errorlog"
|
||||
|
|
||||
*/
|
||||
|
||||
'log' => env('APP_LOG', 'single'),
|
||||
|
||||
'log_level' => env('APP_LOG_LEVEL', 'debug'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
@ -171,21 +156,19 @@ return [
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
Laravel\Spark\Providers\SparkServiceProvider::class,
|
||||
App\Providers\SparkServiceProvider::class,
|
||||
Laravel\Cashier\CashierServiceProvider::class,
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
Orchestra\Asset\AssetServiceProvider::class,
|
||||
Collective\Html\HtmlServiceProvider::class,
|
||||
/*
|
||||
* Other Service Providers...
|
||||
*/
|
||||
Igaster\LaravelTheme\themeServiceProvider::class,
|
||||
Intervention\Image\ImageServiceProvider::class,
|
||||
Magyarjeti\LaravelLipsum\LipsumServiceProvider::class,
|
||||
Creativeorange\Gravatar\GravatarServiceProvider::class,
|
||||
Acacha\User\Providers\GuestUserServiceProvider::class,
|
||||
Collective\Html\HtmlServiceProvider::class,
|
||||
Orchestra\Asset\AssetServiceProvider::class,
|
||||
],
|
||||
|
||||
/*
|
||||
@ -216,12 +199,11 @@ return [
|
||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||
'Event' => Illuminate\Support\Facades\Event::class,
|
||||
'File' => Illuminate\Support\Facades\File::class,
|
||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||
'Gravatar' => Creativeorange\Gravatar\Facades\Gravatar::class,
|
||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Lipsum' => Magyarjeti\LaravelLipsum\LipsumFacade::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||
@ -235,6 +217,7 @@ return [
|
||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||
'Session' => Illuminate\Support\Facades\Session::class,
|
||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||
'Theme' => Igaster\LaravelTheme\Facades\Theme::class,
|
||||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
|
@ -42,7 +42,8 @@ return [
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'spark',
|
||||
'driver' => 'token',
|
||||
'provider' => 'users',
|
||||
],
|
||||
],
|
||||
|
||||
@ -80,10 +81,6 @@ return [
|
||||
| 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.
|
||||
@ -97,7 +94,6 @@ return [
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'email' => 'spark::auth.emails.password',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
],
|
||||
|
@ -36,7 +36,8 @@ return [
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
//
|
||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
'encrypted' => true,
|
||||
],
|
||||
],
|
||||
|
||||
|
@ -37,7 +37,7 @@ return [
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been setup for each driver as an example of the required options.
|
||||
|
|
||||
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
||||
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
|
||||
|
|
||||
*/
|
||||
|
||||
@ -61,6 +61,7 @@ return [
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION'),
|
||||
'bucket' => env('AWS_BUCKET'),
|
||||
'url' => env('AWS_URL'),
|
||||
],
|
||||
|
||||
],
|
||||
|
52
config/hashing.php
Normal file
52
config/hashing.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Hash Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default hash driver that will be used to hash
|
||||
| passwords for your application. By default, the bcrypt algorithm is
|
||||
| used; however, you remain free to modify this option if you wish.
|
||||
|
|
||||
| Supported: "bcrypt", "argon"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'bcrypt',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bcrypt Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'bcrypt' => [
|
||||
'rounds' => 10,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Argon Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Argon algorithm. These will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'argon' => [
|
||||
'memory' => 1024,
|
||||
'threads' => 2,
|
||||
'time' => 2,
|
||||
],
|
||||
|
||||
];
|
81
config/logging.php
Normal file
81
config/logging.php
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
use Monolog\Handler\StreamHandler;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
'days' => 7,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => 'critical',
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => 'debug',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
@ -4,14 +4,12 @@ return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Driver
|
||||
| Default Queue Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel's queue API supports an assortment of back-ends via a single
|
||||
| API, giving you convenient access to each back-end using the same
|
||||
| syntax for each one. Here you may set the default queue driver.
|
||||
|
|
||||
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||
| syntax for every one. Here you may define a default connection.
|
||||
|
|
||||
*/
|
||||
|
||||
@ -26,6 +24,8 @@ return [
|
||||
| is used by your application. A default configuration has been added
|
||||
| for each back-end shipped with Laravel. You are free to add more.
|
||||
|
|
||||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
@ -50,11 +50,11 @@ return [
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => 'your-public-key',
|
||||
'secret' => 'your-secret-key',
|
||||
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
|
||||
'queue' => 'your-queue-name',
|
||||
'region' => 'us-east-1',
|
||||
'key' => env('SQS_KEY', 'your-public-key'),
|
||||
'secret' => env('SQS_SECRET', 'your-secret-key'),
|
||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
||||
'region' => env('SQS_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
@ -62,6 +62,7 @@ return [
|
||||
'connection' => 'default',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'block_for' => null,
|
||||
],
|
||||
|
||||
],
|
||||
|
@ -8,16 +8,12 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
|
||||
| as Stripe, Mailgun, SparkPost 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'),
|
||||
@ -29,6 +25,10 @@ return [
|
||||
'region' => 'us-east-1',
|
||||
],
|
||||
|
||||
'sparkpost' => [
|
||||
'secret' => env('SPARKPOST_SECRET'),
|
||||
],
|
||||
|
||||
'stripe' => [
|
||||
'model' => App\User::class,
|
||||
'key' => env('STRIPE_KEY'),
|
||||
|
@ -14,12 +14,10 @@ use Faker\Generator as Faker;
|
||||
*/
|
||||
|
||||
$factory->define(App\User::class, function (Faker $faker) {
|
||||
static $password;
|
||||
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->unique()->safeEmail,
|
||||
'password' => $password ?: $password = bcrypt('secret'),
|
||||
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
});
|
||||
|
35
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
35
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
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');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
@ -14,7 +15,7 @@ class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
@ -26,6 +27,6 @@ class CreatePasswordResetsTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('password_resets');
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
@ -3,12 +3,9 @@
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use App\Models\Site;
|
||||
|
||||
class CreateTableSites extends Migration
|
||||
{
|
||||
private $convert = 'App\Models\Old\Setup';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
@ -16,14 +13,12 @@ class CreateTableSites extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('sites');
|
||||
Schema::create('sites', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('url');
|
||||
$table->string("name");
|
||||
$table->string('devurl')->nullable();
|
||||
$table->text('aboutus')->nullable();
|
||||
$table->string('name');
|
||||
$table->json('address')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('email');
|
||||
@ -33,21 +28,6 @@ class CreateTableSites extends Migration
|
||||
$table->string('favicon')->nullable();
|
||||
$table->string('theme');
|
||||
});
|
||||
|
||||
if ($this->convert)
|
||||
foreach (($this->convert)::all() as $o)
|
||||
{
|
||||
$oo = new Site;
|
||||
$oo->url = rtrim($o->url,'/');
|
||||
$oo->name = $o->site_details['name'];
|
||||
$oo->email = $o->site_details['email'];
|
||||
$oo->address = ['address1'=>$o->site_details['address1'],'address2'=>$o->site_details['address2'],'city'=>$o->site_details['city'],'state'=>$o->site_details['state'],'postcode'=>$o->site_details['pcode']];
|
||||
$oo->phone = $o->site_details['phone'];
|
||||
$oo->fax = $o->site_details['fax'];
|
||||
$oo->theme = 'metronic-fe';
|
||||
$oo->devurl = 'http://graytech';
|
||||
$oo->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,12 +3,9 @@
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use App\Models\Currency;
|
||||
|
||||
class CreateTableCurrencies extends Migration
|
||||
{
|
||||
private $convert = 'App\Models\Old\Currency';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
@ -16,7 +13,6 @@ class CreateTableCurrencies extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('currencies');
|
||||
Schema::create('currencies', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
@ -24,17 +20,6 @@ class CreateTableCurrencies extends Migration
|
||||
$table->string('threecode',3);
|
||||
$table->boolean('active');
|
||||
});
|
||||
|
||||
if ($this->convert)
|
||||
foreach (($this->convert)::all() as $o)
|
||||
{
|
||||
$oo = new Currency;
|
||||
$oo->name = $o->name;
|
||||
$oo->symbol = $o->symbol;
|
||||
$oo->threecode = $o->three_digit;
|
||||
$oo->active = $o->three_code == 'AUS' ? TRUE : FALSE;
|
||||
$oo->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,12 +3,9 @@
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use App\Models\{Country,Currency};
|
||||
|
||||
class CreateTableCountries extends Migration
|
||||
{
|
||||
private $convert = 'App\Models\Old\Country';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
@ -16,7 +13,6 @@ class CreateTableCountries extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('countries');
|
||||
Schema::create('countries', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
@ -27,24 +23,6 @@ class CreateTableCountries extends Migration
|
||||
|
||||
$table->foreign('currency_id')->references('id')->on('currencies');
|
||||
});
|
||||
|
||||
if ($this->convert)
|
||||
foreach (($this->convert)::all() as $o)
|
||||
{
|
||||
if ($o->currency)
|
||||
$co = Currency::where('name',$o->currency->name)->firstOrFail();
|
||||
|
||||
$oo = new Country;
|
||||
$oo->name = $o->name;
|
||||
$oo->twocode = $o->two_code;
|
||||
$oo->threecode = $o->three_code;
|
||||
$oo->active = $o->three_code == 'AUS' ? TRUE : FALSE;
|
||||
|
||||
if ($o->currency)
|
||||
$co->countries()->save($oo);
|
||||
else
|
||||
$oo->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,86 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use App\Models\Country;
|
||||
use App\User;
|
||||
|
||||
class CreateTableUsers extends Migration
|
||||
{
|
||||
private $convert = 'App\Models\Old\Account';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('site_id');
|
||||
$table->string('email');
|
||||
$table->string('password')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->boolean('active');
|
||||
$table->string('title')->nullable();
|
||||
$table->string('firstname');
|
||||
$table->string('lastname');
|
||||
$table->integer('country_id');
|
||||
$table->string('address1')->nullable();
|
||||
$table->string('address2')->nullable();
|
||||
$table->string('city')->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->string('postcode')->nullable();
|
||||
$table->boolean('emailable')->default(TRUE);
|
||||
|
||||
$table->unique(['site_id','email']);
|
||||
});
|
||||
|
||||
if ($this->convert)
|
||||
foreach (($this->convert)::where('id','>',0)->get() as $o)
|
||||
{
|
||||
$co = Country::where('name',$o->country->name)->firstOrFail();
|
||||
$oo = User::where('email',$o->email)->first();
|
||||
|
||||
if ($oo) {
|
||||
if ($oo->updated_at > date('Y-m-d H:i:s',$o->date_last))
|
||||
continue;
|
||||
|
||||
//printf("Updating user [%s]\n",$oo->email);
|
||||
} else {
|
||||
$oo = new User;
|
||||
//printf("New user [%s]\n",$o->email);
|
||||
}
|
||||
|
||||
$oo->site_id = $o->site_id;
|
||||
$oo->email = $o->email;
|
||||
$oo->password = $o->password;
|
||||
$oo->firstname = $o->first_name;
|
||||
$oo->lastname = $o->last_name;
|
||||
$oo->address1 = $o->address1;
|
||||
$oo->address2 = $o->address2;
|
||||
$oo->city = $o->city;
|
||||
$oo->state = $o->state;
|
||||
$oo->postcode = $o->zip;
|
||||
$oo->active = $o->active;
|
||||
$oo->created_at = date('Y-m-d H:i:s',$o->date_orig);
|
||||
$oo->updated_at = $o->date_last ? date('Y-m-d H:i:s',$o->date_last) : NULL;
|
||||
//$oo->country_id = $co->id;
|
||||
$co->users()->save($oo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
26
database/seeds/CountryTableSeeder.php
Normal file
26
database/seeds/CountryTableSeeder.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\{Country,Currency};
|
||||
|
||||
class CountryTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$o = new Country;
|
||||
$o->name = 'Australia';
|
||||
$o->twocode = 'AU';
|
||||
$o->threecode = 'AUS';
|
||||
$o->currency_id = '61';
|
||||
$o->active = TRUE;
|
||||
|
||||
$oo = Currency::where('threecode','AUD')->firstOrFail();
|
||||
|
||||
$oo->countries()->save($o);
|
||||
}
|
||||
}
|
22
database/seeds/CurrencyTableSeeder.php
Normal file
22
database/seeds/CurrencyTableSeeder.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Currency;
|
||||
|
||||
class CurrencyTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$o = new Currency;
|
||||
$o->name = 'Australian Dollars';
|
||||
$o->symbol = '$';
|
||||
$o->threecode = 'AUD';
|
||||
$o->active = TRUE;
|
||||
$o->save();
|
||||
}
|
||||
}
|
@ -5,12 +5,15 @@ use Illuminate\Database\Seeder;
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// $this->call(UsersTableSeeder::class);
|
||||
$this->call([
|
||||
CurrencyTableSeeder::class,
|
||||
CountryTableSeeder::class
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
14932
package-lock.json
generated
14932
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
48
package.json
48
package.json
@ -1,29 +1,41 @@
|
||||
{
|
||||
"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",
|
||||
"dev": "npm run development",
|
||||
"development": "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",
|
||||
"watch-poll": "npm run watch -- --watch-poll",
|
||||
"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"
|
||||
"prod": "npm run production",
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"lint": "./node_modules/.bin/eslint --ext .js,.vue resources/assets/js",
|
||||
"stats": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js --profile --json > stats.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"devDependencies": {
|
||||
"acacha-forms": "^1.0.8",
|
||||
"admin-lte": "^2.3.11",
|
||||
"axios": "^0.15.2",
|
||||
"bootstrap-sass": "^3.3.7",
|
||||
"cross-env": "^3.2.3",
|
||||
"admin-lte": "^2.4.3",
|
||||
"axios": "^0.8",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"bootstrap-sass": "3.3.7",
|
||||
"cross-env": "^5.0.1",
|
||||
"eslint": "^3.14.1",
|
||||
"eslint-config-standard": "^6.2.1",
|
||||
"eslint-friendly-formatter": "^2.0.7",
|
||||
"eslint-loader": "^1.6.1",
|
||||
"eslint-plugin-html": "^2.0.0",
|
||||
"eslint-plugin-promise": "^3.4.0",
|
||||
"eslint-plugin-standard": "^2.0.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
"icheck": "^1.0.2",
|
||||
"ionicons": "^3.0.0",
|
||||
"jquery": "^2.1.4",
|
||||
"js-cookie": "^2.1.0",
|
||||
"laravel-mix": "0.*",
|
||||
"moment": "^2.10.6",
|
||||
"promise": "^7.1.1",
|
||||
"sweetalert": "^1.1.3",
|
||||
"toastr": "^2.1.2",
|
||||
"underscore": "^1.8.3",
|
||||
"urijs": "^1.17.0",
|
||||
"vue": "2.*"
|
||||
}
|
||||
"jquery": "^3.2",
|
||||
"laravel-mix": "^2.0",
|
||||
"less": "^3.0.1",
|
||||
"less-loader": "^4.1.0",
|
||||
"lodash": "^4.17.4",
|
||||
"popper.js": "^1.12",
|
||||
"toastr": "^2.1.4",
|
||||
"vue": "^2.5.7"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
@ -27,5 +27,6 @@
|
||||
<env name="CACHE_DRIVER" value="array"/>
|
||||
<env name="SESSION_DRIVER" value="array"/>
|
||||
<env name="QUEUE_DRIVER" value="sync"/>
|
||||
<env name="MAIL_DRIVER" value="array"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
|
3272
public/assets/animate/css/animate.css
vendored
3272
public/assets/animate/css/animate.css
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
487
public/css/adminlte-app.css
vendored
487
public/css/adminlte-app.css
vendored
File diff suppressed because it is too large
Load Diff
4509
public/css/all.css
vendored
4509
public/css/all.css
vendored
File diff suppressed because one or more lines are too long
16062
public/css/app.css
vendored
16062
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
31122
public/js/app.js
vendored
31122
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
{
|
||||
"/js/app.js": "/js/app.js",
|
||||
"/mix.js": "/mix.js",
|
||||
"/css/app.css": "/css/app.css",
|
||||
"/css/adminlte-app.css": "/css/adminlte-app.css",
|
||||
"/css/blue.png": "/css/blue.png",
|
||||
"/css/all.css": "/css/all.css"
|
||||
}
|
110
public/mix.js
vendored
110
public/mix.js
vendored
@ -1,110 +0,0 @@
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 71);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 19:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 20:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 21:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 22:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 71:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(22);
|
||||
__webpack_require__(20);
|
||||
__webpack_require__(21);
|
||||
module.exports = __webpack_require__(19);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
25
resources/assets/js/app.js
vendored
25
resources/assets/js/app.js
vendored
@ -1,23 +1,22 @@
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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.
|
||||
|
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
require('./bootstrap');
|
||||
|
||||
window.Vue = require('vue');
|
||||
|
||||
/**
|
||||
* Next, we will create a fresh Vue application instance and attach it to
|
||||
* the page. Then, you may begin adding components to this application
|
||||
* or customize the JavaScript scaffolding to fit your unique needs.
|
||||
*/
|
||||
|
||||
// Vue.component('example-component', require('./components/ExampleComponent.vue'));
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app'
|
||||
});
|
||||
|
5
resources/assets/js/bootstrap.js
vendored
5
resources/assets/js/bootstrap.js
vendored
@ -1,5 +1,6 @@
|
||||
|
||||
window._ = require('lodash');
|
||||
window.Popper = require('popper.js').default;
|
||||
|
||||
/**
|
||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
||||
@ -72,5 +73,7 @@ Vue.component('reset-password-form', require('./components/auth/ResetPasswordFor
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: 'your-pusher-key'
|
||||
// key: process.env.MIX_PUSHER_APP_KEY,
|
||||
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
||||
// encrypted: true
|
||||
// });
|
||||
|
@ -1,23 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Example Component</div>
|
||||
|
||||
<div class="panel-body">
|
||||
I'm an example component!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
console.log('Component mounted.')
|
||||
}
|
||||
}
|
||||
</script>
|
@ -10,10 +10,10 @@ export default {
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%'
|
||||
}).on('ifChecked', function (event) {
|
||||
component.form.set('terms', true)
|
||||
component.form.setField('terms', true)
|
||||
component.form.errors.clear('terms')
|
||||
}).on('ifUnchecked', function (event) {
|
||||
component.form.set('terms', '')
|
||||
component.form.setField('terms', '')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
14
resources/assets/js/components/bootstrap.js
vendored
14
resources/assets/js/components/bootstrap.js
vendored
@ -1,14 +0,0 @@
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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');
|
7
resources/assets/js/components/home.js
vendored
7
resources/assets/js/components/home.js
vendored
@ -1,7 +0,0 @@
|
||||
Vue.component('home', {
|
||||
props: ['user'],
|
||||
|
||||
mounted() {
|
||||
//
|
||||
}
|
||||
});
|
8
resources/assets/sass/app.scss
vendored
8
resources/assets/sass/app.scss
vendored
@ -1,11 +1,12 @@
|
||||
|
||||
// Fonts
|
||||
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
|
||||
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
|
||||
|
||||
// Variables
|
||||
@import "variables";
|
||||
|
||||
// Bootstrap
|
||||
// @import "node_modules/bootstrap/scss/bootstrap.scss";
|
||||
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
|
||||
|
||||
//Ionicons
|
||||
@ -13,3 +14,8 @@
|
||||
|
||||
//Font awesome
|
||||
@import "node_modules/font-awesome/scss/font-awesome.scss";
|
||||
|
||||
.navbar-laravel {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
@ -16,11 +16,13 @@ return [
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :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.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => 'The :attribute must be between :min and :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
@ -35,15 +37,19 @@ return [
|
||||
'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.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'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.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'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.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
@ -52,6 +58,7 @@ return [
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'mimetypes' => '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.',
|
||||
@ -59,6 +66,7 @@ return [
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'not_regex' => 'The :attribute format is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
@ -80,8 +88,8 @@ return [
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
'vat_id' => 'This VAT identification number is invalid.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -111,8 +119,6 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [
|
||||
'team' => Spark::teamString()
|
||||
],
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
|
@ -9,7 +9,7 @@
|
||||
<div id="app" v-cloak>
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="{{ url('/home') }}">{!! config('app.namehtml') !!}</a>
|
||||
<a href="{{ url('/home') }}">{!! config('app.name_html_long') !!}</a>
|
||||
</div><!-- /.login-logo -->
|
||||
|
||||
@if (count($errors) > 0)
|
||||
|
44
resources/theme/backend/adminlte/auth/register.blade.php
Normal file
44
resources/theme/backend/adminlte/auth/register.blade.php
Normal file
@ -0,0 +1,44 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Register
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<body class="hold-transition register-page">
|
||||
<div id="app" v-cloak>
|
||||
<div class="register-box">
|
||||
<div class="register-logo">
|
||||
<a href="{{ url('/home') }}">{!! config('app.name_html_long') !!}</a>
|
||||
</div>
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> {{ trans('message.someproblems') }}<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="register-box-body">
|
||||
<p class="login-box-msg">Register for access</p>
|
||||
|
||||
<register-form></register-form>
|
||||
<!-- #include('auth.partials.social_login') -->
|
||||
|
||||
<a href="{{ url('/login') }}" class="text-center">I already have an account</a>
|
||||
</div><!-- /.form-box -->
|
||||
</div><!-- /.register-box -->
|
||||
</div>
|
||||
|
||||
@include('layouts.partials.scripts_auth')
|
||||
|
||||
@include('auth.terms')
|
||||
|
||||
</body>
|
||||
|
||||
@endsection
|
19
resources/theme/backend/adminlte/auth/terms.blade.php
Normal file
19
resources/theme/backend/adminlte/auth/terms.blade.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Terms and conditions modal -->
|
||||
<div class="modal fade" id="termsModal" tabindex="-1" role="dialog" aria-labelledby="Terms and conditions" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Terms and conditions</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<p>Lorem ipsum dolor sit amet, veniam numquam has te. No suas nonumes recusabo mea, est ut graeci definitiones. His ne melius vituperata scriptorem, cum paulo copiosae conclusionemque at. Facer inermis ius in, ad brute nominati referrentur vis. Dicat erant sit ex. Phaedrum imperdiet scribentur vix no, ad latine similique forensibus vel.</p>
|
||||
<p>Dolore populo vivendum vis eu, mei quaestio liberavisse ex. Electram necessitatibus ut vel, quo at probatus oportere, molestie conclusionemque pri cu. Brute augue tincidunt vim id, ne munere fierent rationibus mei. Ut pro volutpat praesent qualisque, an iisque scripta intellegebat eam.</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,18 +1,20 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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.
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::group([
|
||||
'middleware' => 'auth:api'
|
||||
], function () {
|
||||
//
|
||||
/*
|
||||
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
*/
|
||||
|
@ -2,22 +2,23 @@
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Routes
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register all of the routes for an application.
|
||||
| It's a breeze. Simply tell Laravel the URIs it should respond to
|
||||
| and give it the controller to call when that URI is requested.
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
// Generic Image Renderer - Render images that we dont have with a generic image
|
||||
Route::get('image/generic/{width}/{height}/{color}/{name?}','MediaController@image')->name('image');
|
||||
|
||||
Route::get('/', 'WelcomeController@show');
|
||||
|
||||
Route::group(['middleware'=>['setTheme:adminlte-be']], function() {
|
||||
Route::get('/login', 'Auth\LoginController@showLoginForm');
|
||||
Route::post('/login', 'Auth\LoginController@login');
|
||||
Route::get('/home', 'HomeController@show');
|
||||
Route::group(['middleware'=>['theme:adminlte-be']], function() {
|
||||
Auth::routes();
|
||||
Route::get('/logout','Auth\LoginController@logout');
|
||||
});
|
||||
|
2
spark/.gitignore
vendored
2
spark/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
/node_modules
|
||||
/vendor
|
237
spark/changes.md
237
spark/changes.md
@ -1,237 +0,0 @@
|
||||
# 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.
|
||||
|
@ -1,36 +0,0 @@
|
||||
{
|
||||
"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
1898
spark/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,30 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
<?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,
|
||||
];
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
<?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();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
<?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();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
<?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');
|
||||
});
|
||||
}
|
||||
}
|
@ -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::useBraintree()->noCardUpFront()->trialDays(10);
|
||||
|
||||
Spark::freePlan()
|
||||
->features([
|
||||
'First', 'Second', 'Third'
|
||||
]);
|
||||
|
||||
Spark::plan('Basic', 'provider-id-1')
|
||||
->price(10)
|
||||
->features([
|
||||
'First', 'Second', 'Third'
|
||||
]);
|
||||
}
|
||||
}
|
@ -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::useBraintree()->noCardUpFront()->teamTrialDays(10);
|
||||
|
||||
Spark::freeTeamPlan()
|
||||
->features([
|
||||
'First', 'Second', 'Third'
|
||||
]);
|
||||
|
||||
Spark::teamPlan('Basic', 'provider-id-1')
|
||||
->price(10)
|
||||
->features([
|
||||
'First', 'Second', 'Third'
|
||||
]);
|
||||
}
|
||||
}
|
@ -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'
|
||||
]);
|
||||
}
|
||||
}
|
@ -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()->teamTrialDays(10);
|
||||
|
||||
Spark::freeTeamPlan()
|
||||
->features([
|
||||
'First', 'Second', 'Third'
|
||||
]);
|
||||
|
||||
Spark::teamPlan('Basic', 'provider-id-1')
|
||||
->price(10)
|
||||
->features([
|
||||
'First', 'Second', 'Third'
|
||||
]);
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Laravel\Spark\Team as SparkTeam;
|
||||
|
||||
class Team extends SparkTeam
|
||||
{
|
||||
//
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
@ -1,106 +0,0 @@
|
||||
<?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,
|
||||
],
|
||||
],
|
||||
|
||||
];
|
@ -1,40 +0,0 @@
|
||||
<?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'),
|
||||
],
|
||||
|
||||
];
|
@ -1,38 +0,0 @@
|
||||
<?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'),
|
||||
],
|
||||
|
||||
];
|
@ -1,50 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user