WIP: Standard backend theme page and login
Signed-off-by: Deon George <deon@leenooks.net>
This commit is contained in:
parent
e594ff2057
commit
33658e37a3
@ -9,8 +9,8 @@ DB_CONNECTION=mysql
|
|||||||
DB_HOST=mariadb
|
DB_HOST=mariadb
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_DATABASE=testing
|
DB_DATABASE=testing
|
||||||
DB_USERNAME=root
|
DB_USERNAME=test
|
||||||
DB_PASSWORD=secret
|
DB_PASSWORD=test
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
BROADCAST_DRIVER=log
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@ npm-debug.log
|
|||||||
yarn-error.log
|
yarn-error.log
|
||||||
.env
|
.env
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
storage/debugbar
|
||||||
|
@ -12,6 +12,8 @@ services:
|
|||||||
variables:
|
variables:
|
||||||
MYSQL_DATABASE: testing
|
MYSQL_DATABASE: testing
|
||||||
MYSQL_ROOT_PASSWORD: test
|
MYSQL_ROOT_PASSWORD: test
|
||||||
|
MYSQL_USER: test
|
||||||
|
MYSQL_PASSWORD: test
|
||||||
|
|
||||||
# This folder is cached between builds
|
# This folder is cached between builds
|
||||||
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
|
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
|
||||||
|
@ -25,6 +25,8 @@ class HomeController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show()
|
public function show()
|
||||||
{
|
{
|
||||||
return view('home');
|
return view('home',[
|
||||||
|
'page_title'=>'Dashboard',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
26
app/Models/Country.php
Normal file
26
app/Models/Country.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Country extends Model
|
||||||
|
{
|
||||||
|
public $timestamps = FALSE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The currency this country belongs to
|
||||||
|
*/
|
||||||
|
public function currency()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('App\Models\Currency');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The accounts in this country
|
||||||
|
*/
|
||||||
|
public function users()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\User');
|
||||||
|
}
|
||||||
|
}
|
18
app/Models/Currency.php
Normal file
18
app/Models/Currency.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Currency extends Model
|
||||||
|
{
|
||||||
|
public $timestamps = FALSE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The accounts in this country
|
||||||
|
*/
|
||||||
|
public function countries()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Country');
|
||||||
|
}
|
||||||
|
}
|
18
app/Models/Old/Account.php
Normal file
18
app/Models/Old/Account.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?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');
|
||||||
|
}
|
||||||
|
}
|
18
app/Models/Old/Country.php
Normal file
18
app/Models/Old/Country.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?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');
|
||||||
|
}
|
||||||
|
}
|
10
app/Models/Old/Currency.php
Normal file
10
app/Models/Old/Currency.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Old;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Currency extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'ab_currency';
|
||||||
|
}
|
@ -6,8 +6,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class Site extends Model
|
class Site extends Model
|
||||||
{
|
{
|
||||||
protected $table = 'site';
|
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'address'=>'array',
|
'address'=>'array',
|
||||||
];
|
];
|
||||||
|
62
app/User.php
62
app/User.php
@ -2,49 +2,31 @@
|
|||||||
|
|
||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Laravel\Spark\User as SparkUser;
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
|
|
||||||
class User extends SparkUser
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
/**
|
use Notifiable;
|
||||||
* The attributes that are mass assignable.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $fillable = [
|
|
||||||
'name',
|
|
||||||
'email',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes excluded from the model's JSON form.
|
* The country this user belongs to
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
*/
|
||||||
protected $hidden = [
|
public function country()
|
||||||
'password',
|
{
|
||||||
'remember_token',
|
return $this->belongsTo('App\Models\Country');
|
||||||
'authy_id',
|
}
|
||||||
'country_code',
|
|
||||||
'phone',
|
/**
|
||||||
'card_brand',
|
* Only query active categories
|
||||||
'card_last_four',
|
*/
|
||||||
'card_country',
|
public function scopeActive()
|
||||||
'billing_address',
|
{
|
||||||
'billing_address_line_2',
|
return $this->where('active',TRUE);
|
||||||
'billing_city',
|
}
|
||||||
'billing_zip',
|
|
||||||
'billing_country',
|
public function getNameAttribute($value)
|
||||||
'extra_billing_information',
|
{
|
||||||
];
|
return $this->firstname.' '.$this->lastname;
|
||||||
|
}
|
||||||
/**
|
|
||||||
* The attributes that should be cast to native types.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $casts = [
|
|
||||||
'trial_ends_at' => 'datetime',
|
|
||||||
'uses_two_factor_auth' => 'boolean',
|
|
||||||
];
|
|
||||||
}
|
}
|
@ -9,7 +9,9 @@
|
|||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.0.0",
|
"php": ">=7.0.0",
|
||||||
|
"acacha/user": "^0.2.2",
|
||||||
"barryvdh/laravel-debugbar": "^3.1",
|
"barryvdh/laravel-debugbar": "^3.1",
|
||||||
|
"creativeorange/gravatar": "^1.0",
|
||||||
"fideloper/proxy": "~3.3",
|
"fideloper/proxy": "~3.3",
|
||||||
"igaster/laravel-theme": "^2.0",
|
"igaster/laravel-theme": "^2.0",
|
||||||
"intervention/image": "^2.4",
|
"intervention/image": "^2.4",
|
||||||
|
645
composer.lock
generated
645
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -184,6 +184,8 @@ return [
|
|||||||
Collective\Html\HtmlServiceProvider::class,
|
Collective\Html\HtmlServiceProvider::class,
|
||||||
Intervention\Image\ImageServiceProvider::class,
|
Intervention\Image\ImageServiceProvider::class,
|
||||||
Magyarjeti\LaravelLipsum\LipsumServiceProvider::class,
|
Magyarjeti\LaravelLipsum\LipsumServiceProvider::class,
|
||||||
|
Creativeorange\Gravatar\GravatarServiceProvider::class,
|
||||||
|
Acacha\User\Providers\GuestUserServiceProvider::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -215,6 +217,7 @@ return [
|
|||||||
'Event' => Illuminate\Support\Facades\Event::class,
|
'Event' => Illuminate\Support\Facades\Event::class,
|
||||||
'File' => Illuminate\Support\Facades\File::class,
|
'File' => Illuminate\Support\Facades\File::class,
|
||||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||||
|
'Gravatar' => Creativeorange\Gravatar\Facades\Gravatar::class,
|
||||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||||
'Image' => Intervention\Image\Facades\Image::class,
|
'Image' => Intervention\Image\Facades\Image::class,
|
||||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||||
|
34
config/gravatar.php
Normal file
34
config/gravatar.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'default' => array(
|
||||||
|
|
||||||
|
// By default, images are presented at 80px by 80px if no size parameter is supplied.
|
||||||
|
// You may request a specific image size, which will be dynamically delivered from Gravatar
|
||||||
|
// by passing a single pixel dimension (since the images are square):
|
||||||
|
'size' => 80,
|
||||||
|
|
||||||
|
// the fallback image, can be a string or a url
|
||||||
|
// for more info, visit: http://en.gravatar.com/site/implement/images/#default-image
|
||||||
|
'fallback' => 'mm',
|
||||||
|
|
||||||
|
// would you like to return a https://... image
|
||||||
|
'secure' => false,
|
||||||
|
|
||||||
|
// Gravatar allows users to self-rate their images so that they can indicate if an image
|
||||||
|
// is appropriate for a certain audience. By default, only 'G' rated images are displayed
|
||||||
|
// unless you indicate that you would like to see higher ratings.
|
||||||
|
// Available options:
|
||||||
|
// g: suitable for display on all websites with any audience type.
|
||||||
|
// pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence.
|
||||||
|
// r: may contain such things as harsh profanity, intense violence, nudity, or hard drug use.
|
||||||
|
// x: may contain hardcore sexual imagery or extremely disturbing violence.
|
||||||
|
'maximumRating' => 'g',
|
||||||
|
|
||||||
|
// If for some reason you wanted to force the default image to always load, you can do that setting this to true
|
||||||
|
'forceDefault' => false,
|
||||||
|
|
||||||
|
// If you require a file-type extension (some places do) then you may also add an (optional) .jpg extension to that URL
|
||||||
|
'forceExtension' => 'jpg',
|
||||||
|
)
|
||||||
|
);
|
@ -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,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,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,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
|
|
||||||
class CreatePasswordResetsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('password_resets', function (Blueprint $table) {
|
|
||||||
$table->string('email')->index();
|
|
||||||
$table->string('token')->index();
|
|
||||||
$table->timestamp('created_at')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('password_resets');
|
|
||||||
}
|
|
||||||
}
|
|
@ -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,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,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,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,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,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');
|
|
||||||
}
|
|
||||||
}
|
|
@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
|
|||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use App\Models\Site;
|
use App\Models\Site;
|
||||||
|
|
||||||
class CreateTableSite extends Migration
|
class CreateTableSites extends Migration
|
||||||
{
|
{
|
||||||
private $convert = 'App\Models\Old\Setup';
|
private $convert = 'App\Models\Old\Setup';
|
||||||
|
|
||||||
@ -16,8 +16,8 @@ class CreateTableSite extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('site');
|
Schema::dropIfExists('sites');
|
||||||
Schema::create('site', function (Blueprint $table) {
|
Schema::create('sites', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->string('url');
|
$table->string('url');
|
||||||
@ -37,20 +37,16 @@ class CreateTableSite extends Migration
|
|||||||
if ($this->convert)
|
if ($this->convert)
|
||||||
foreach (($this->convert)::all() as $o)
|
foreach (($this->convert)::all() as $o)
|
||||||
{
|
{
|
||||||
$so = Site::where(['url'=>rtrim($o->url,'/')])->first();
|
$oo = new Site;
|
||||||
|
$oo->url = rtrim($o->url,'/');
|
||||||
if (! $so)
|
$oo->name = $o->site_details['name'];
|
||||||
$so = new Site;
|
$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']];
|
||||||
$so->url = rtrim($o->url,'/');
|
$oo->phone = $o->site_details['phone'];
|
||||||
$so->name = $o->site_details['name'];
|
$oo->fax = $o->site_details['fax'];
|
||||||
$so->email = $o->site_details['email'];
|
$oo->theme = 'metronic-fe';
|
||||||
$so->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->devurl = 'http://graytech';
|
||||||
$so->phone = $o->site_details['phone'];
|
$oo->save();
|
||||||
$so->fax = $o->site_details['fax'];
|
|
||||||
$so->theme = 'metronic-fe';
|
|
||||||
$so->devurl = 'http://graytech';
|
|
||||||
$so->save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,6 +57,6 @@ class CreateTableSite extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('site');
|
Schema::dropIfExists('sites');
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
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.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('currencies');
|
||||||
|
Schema::create('currencies', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('symbol',2)->nullable();
|
||||||
|
$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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('currencies');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
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.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('countries');
|
||||||
|
Schema::create('countries', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('twocode',2)->nullable();
|
||||||
|
$table->string('threecode',3);
|
||||||
|
$table->integer('currency_id')->unsigned()->nullable();
|
||||||
|
$table->boolean('active');
|
||||||
|
|
||||||
|
$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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('countries');
|
||||||
|
}
|
||||||
|
}
|
86
database/migrations/2017_12_08_050712_CreateTableUsers.php
Normal file
86
database/migrations/2017_12_08_050712_CreateTableUsers.php
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<?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');
|
||||||
|
}
|
||||||
|
}
|
1
public/theme/backend/adminlte/site/js/bootstrap3-typeahead.min.js
vendored
Normal file
1
public/theme/backend/adminlte/site/js/bootstrap3-typeahead.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/theme/backend/adminlte/site/js/fastclick.min.js
vendored
Normal file
1
public/theme/backend/adminlte/site/js/fastclick.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
16
public/theme/backend/adminlte/site/js/jquery.slimscroll.min.js
vendored
Normal file
16
public/theme/backend/adminlte/site/js/jquery.slimscroll.min.js
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
|
||||||
|
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||||
|
*
|
||||||
|
* Version: 1.3.8
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event;
|
||||||
|
var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0<d?Math.ceil(g):Math.floor(g),c.css({top:g+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());g=
|
||||||
|
l*(b[0].scrollHeight-b.outerHeight());e&&(g=d,d=g/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),f),c.css({top:d+"px"}));b.scrollTop(g);b.trigger("slimscrolling",~~g);w();p()}function x(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),30);c.css({height:u+"px"});var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function w(){x();clearTimeout(B);l==~~l?(k=a.allowPageScroll,C!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;C=l;u>=b.outerHeight()?k=!0:(c.stop(!0,
|
||||||
|
!0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height",
|
||||||
|
h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)q=parseInt(a.scrollTo);else if("scrollBy"in f)q+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;q=e("<div></div>").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",
|
||||||
|
width:a.width,height:a.height});var m=e("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,
|
||||||
|
WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",
|
||||||
|
function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});
|
||||||
|
x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);
|
32
resources/theme/backend/adminlte/home.blade.php
Normal file
32
resources/theme/backend/adminlte/home.blade.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('htmlheader_title')
|
||||||
|
Page Title
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('contentheader_title')
|
||||||
|
Home Page
|
||||||
|
@endsection
|
||||||
|
@section('contentheader_description')
|
||||||
|
Home
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('main-content')
|
||||||
|
<div class="col-sm-2 col-md-offset-0">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title">Content</h3>
|
||||||
|
<div class="box-tools pull-right">
|
||||||
|
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||||
|
<i class="fa fa-minus"></i></button>
|
||||||
|
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||||
|
<i class="fa fa-times"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box-body">
|
||||||
|
Content Here
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
41
resources/theme/backend/adminlte/layouts/app.blade.php
Normal file
41
resources/theme/backend/adminlte/layouts/app.blade.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
@section('htmlheader')
|
||||||
|
@include('layouts.partials.htmlheader')
|
||||||
|
@show
|
||||||
|
|
||||||
|
<body class="fixed skin-blue sidebar-mini">
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<div class="wrapper">
|
||||||
|
@include('layouts.partials.mainheader')
|
||||||
|
|
||||||
|
@include('layouts.partials.sidebar')
|
||||||
|
|
||||||
|
<!-- Content Wrapper. Contains page content -->
|
||||||
|
<div class="content-wrapper">
|
||||||
|
|
||||||
|
@include('layouts.partials.contentheader')
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<!-- Your Page Content Here -->
|
||||||
|
@yield('main-content')
|
||||||
|
</div>
|
||||||
|
</section><!-- /.content -->
|
||||||
|
|
||||||
|
</div><!-- /.content-wrapper -->
|
||||||
|
|
||||||
|
<!-- #include('layouts.partials.controlsidebar') -->
|
||||||
|
@include('layouts.partials.footer')
|
||||||
|
</div><!-- ./wrapper -->
|
||||||
|
</div> <!-- ./app -->
|
||||||
|
|
||||||
|
@section('scripts')
|
||||||
|
@include('layouts.partials.scripts')
|
||||||
|
{{-- Scripts --}}
|
||||||
|
{!! Asset::scripts() !!}
|
||||||
|
@show
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,17 @@
|
|||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<div id="search_results"></div>
|
||||||
|
<h1>
|
||||||
|
@yield('contentheader_title', 'Software Deployment')
|
||||||
|
<small>@yield('contentheader_description')</small>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="{{ url('/home') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||||
|
@isset($breadcrumb)
|
||||||
|
@foreach ($breadcrumb as $item => $url)
|
||||||
|
<li><a href="{{url($url)}}">{{ $item }}</a></li>
|
||||||
|
@endforeach
|
||||||
|
@endisset
|
||||||
|
</ol> <!-- /.breadcrumb -->
|
||||||
|
</section> <!-- /.content-header -->
|
@ -0,0 +1,8 @@
|
|||||||
|
<!-- Main Footer -->
|
||||||
|
<footer class="main-footer">
|
||||||
|
<!-- To the right -->
|
||||||
|
<div class="pull-right hidden-xs">
|
||||||
|
<a href="#"></a><b>{{ config('app.name') }}</b></a>
|
||||||
|
</div>
|
||||||
|
<strong>© Leenooks</strong>
|
||||||
|
</footer>
|
@ -0,0 +1,95 @@
|
|||||||
|
<!-- Main Header -->
|
||||||
|
<header class="main-header">
|
||||||
|
|
||||||
|
<!-- Logo -->
|
||||||
|
<a href="{{ url('/home') }}" class="logo">
|
||||||
|
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||||
|
<span class="logo-mini">{!! config('name_html_short','<b>A</b>N') !!}</span>
|
||||||
|
<!-- logo for regular state and mobile devices -->
|
||||||
|
<span class="logo-lg">{!! config('name_html_long','<b>App</b>Name') !!}</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Header Navbar -->
|
||||||
|
<nav class="navbar navbar-static-top" role="navigation">
|
||||||
|
<!-- Sidebar toggle button-->
|
||||||
|
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||||
|
<span class="sr-only">{{ trans('message.togglenav') }}</span>
|
||||||
|
</a>
|
||||||
|
<!-- Navbar Right Menu -->
|
||||||
|
<div class="navbar-custom-menu">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<!-- Tasks Menu -->
|
||||||
|
@if (Auth::guest())
|
||||||
|
<li><a href="{{ url('/register') }}">{{ trans('message.register') }}</a></li>
|
||||||
|
<li><a href="{{ url('/login') }}">{{ trans('message.login') }}</a></li>
|
||||||
|
@else
|
||||||
|
|
||||||
|
@if (isset($topmenu))
|
||||||
|
<!-- Available Data Menu -->
|
||||||
|
<li class="dropdown tasks-menu" id="import_date">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<span class="hidden-xs">Items</span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li class="header">Header</li>
|
||||||
|
<li>
|
||||||
|
<ul class="menu small">
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="footer"><a href="#">(Not Active)</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<li class="dropdown user user-menu" id="user_menu">
|
||||||
|
<!-- Menu Toggle Button -->
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<!-- The user image in the navbar-->
|
||||||
|
<img src="{{ Gravatar::get($user->email) }}" class="user-image" alt="User Image"/>
|
||||||
|
<!-- hidden-xs hides the username on small devices so only the image appears. -->
|
||||||
|
<span class="hidden-xs">{{ $user->name }}</span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<!-- The user image in the menu -->
|
||||||
|
<li class="user-header">
|
||||||
|
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
|
||||||
|
<p>
|
||||||
|
{{ $user->name }}
|
||||||
|
<small>{{ trans('message.login') }}: @if($user->last_access) {{ $user->last_access->format('Y-m-d') }} @else Unknown @endif</small>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<!-- Menu Footer-->
|
||||||
|
<li class="user-footer">
|
||||||
|
<div class="pull-left">
|
||||||
|
<a href="{{ url('/settings') }}" class="btn btn-default btn-flat">{{ trans('message.profile') }}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="{{ url('/logout') }}" class="btn btn-default btn-flat" id="logout"
|
||||||
|
onclick="event.preventDefault();
|
||||||
|
document.getElementById('logout-form').submit();">
|
||||||
|
{{ trans('message.signout') }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
|
||||||
|
{{ csrf_field() }}
|
||||||
|
<input type="submit" value="logout" style="display: none;">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<!-- Control Sidebar Toggle Button -->
|
||||||
|
@if (isset($controlbar))
|
||||||
|
<li>
|
||||||
|
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
@ -0,0 +1,13 @@
|
|||||||
|
<!-- REQUIRED JS SCRIPTS -->
|
||||||
|
|
||||||
|
<!-- JQuery and bootstrap are required by Laravel 5.3 in resources/assets/js/bootstrap.js-->
|
||||||
|
<!-- Laravel App -->
|
||||||
|
<script src="{{ url (mix('/js/app.js')) }}" type="text/javascript"></script>
|
||||||
|
|
||||||
|
@yield('page-scripts')
|
||||||
|
<!-- Optionally, you can add Slimscroll and FastClick plugins.
|
||||||
|
Both of these plugins are recommended to enhance the
|
||||||
|
user experience. Slimscroll is required when using the
|
||||||
|
fixed layout. -->
|
||||||
|
@js('/site/js/jquery.slimscroll.min.js',jquery)
|
||||||
|
@js('/site/js/fastclick.min.js')
|
@ -0,0 +1,108 @@
|
|||||||
|
<!-- Left side column. contains the logo and sidebar -->
|
||||||
|
<aside class="main-sidebar">
|
||||||
|
|
||||||
|
<!-- sidebar: style can be found in sidebar.less -->
|
||||||
|
<section class="sidebar">
|
||||||
|
|
||||||
|
<!-- Sidebar user panel (optional) -->
|
||||||
|
@if (! Auth::guest())
|
||||||
|
<div class="user-panel">
|
||||||
|
<div class="pull-left image">
|
||||||
|
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
|
||||||
|
</div>
|
||||||
|
<div class="pull-left info">
|
||||||
|
<p>{{ Auth::user()->name }}</p>
|
||||||
|
<!-- Status -->
|
||||||
|
<a href="#"><i class="fa fa-circle text-success"></i> {{ trans('message.online') }}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<!-- search form (Optional) -->
|
||||||
|
<form action="#" method="get" class="sidebar-form">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" name="q" class="form-control" autocomplete="off" placeholder="{{ trans('message.search') }}..."/>
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<!-- /.search form -->
|
||||||
|
|
||||||
|
<!-- Sidebar Menu -->
|
||||||
|
<ul class="sidebar-menu">
|
||||||
|
<li class="header">Menu</li>
|
||||||
|
<!-- Optionally, you can add icons to the links -->
|
||||||
|
<li class="active"><a href="{{ url('home',['date'=>(isset($ido) ? $ido->id : NULL)]) }}"><i class='fa fa-link'></i> <span>{{ trans('message.home') }}</span></a></li>
|
||||||
|
</ul><!-- /.sidebar-menu -->
|
||||||
|
</section>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
@section('page-scripts')
|
||||||
|
@js('/site/js/bootstrap3-typeahead.min.js')
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("input[name=q]").typeahead({
|
||||||
|
delay: 300,
|
||||||
|
minLength: 2,
|
||||||
|
fitToElement: false,
|
||||||
|
appendTo: "#search_results",
|
||||||
|
source: function (query,process) {
|
||||||
|
search('{{ url("search",['date'=>isset($ido) ? $ido->id : NULL]) }}',query,process);
|
||||||
|
},
|
||||||
|
|
||||||
|
matcher: function () { return true; },
|
||||||
|
|
||||||
|
updater: function (item) {
|
||||||
|
window.parent.location.href = '{{ url("/") }}'+users[item];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var c=0;
|
||||||
|
var search = _.debounce(function(url,query,process,icon){
|
||||||
|
$.ajax({
|
||||||
|
url : url,
|
||||||
|
type : 'GET',
|
||||||
|
data : 'term=' + query,
|
||||||
|
dataType : 'JSON',
|
||||||
|
async : false,
|
||||||
|
cache : false,
|
||||||
|
beforeSend : function() {
|
||||||
|
if (c++ == 0) {
|
||||||
|
if (icon)
|
||||||
|
$('i[name='+icon+']').addClass("fa-spin");
|
||||||
|
else
|
||||||
|
$('i[name=searching]').removeClass("hidden");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
success : function(data) {
|
||||||
|
// if json is null, means no match, won't do again.
|
||||||
|
if(data==null || (data.length===0)) return;
|
||||||
|
|
||||||
|
users = {};
|
||||||
|
userLabels = [];
|
||||||
|
_.each(data,function(item,ix,list) {
|
||||||
|
if (_.includes(users,item.label))
|
||||||
|
item.label = item.label + ' #' + item.value;
|
||||||
|
|
||||||
|
userLabels.push(item.label);
|
||||||
|
users[item.label] = item.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
process(userLabels);
|
||||||
|
},
|
||||||
|
complete : function() {
|
||||||
|
if (--c == 0) {
|
||||||
|
if (icon)
|
||||||
|
$('i[name='+icon+']').removeClass("fa-spin");
|
||||||
|
else
|
||||||
|
$('i[name=searching]').addClass("hidden");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 500);
|
||||||
|
</script>
|
||||||
|
@append
|
@ -74,7 +74,6 @@
|
|||||||
</body>
|
</body>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
@extends('spark::layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<home :user="user" inline-template>
|
|
||||||
<div class="container">
|
|
||||||
<!-- Application Dashboard -->
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-8 col-md-offset-2">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">Dashboard</div>
|
|
||||||
|
|
||||||
<div class="panel-body">
|
|
||||||
Your application's dashboard.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</home>
|
|
||||||
@endsection
|
|
@ -1,94 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<!-- Meta Information -->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
<title>@yield('title', config('app.name'))</title>
|
|
||||||
|
|
||||||
<!-- Fonts -->
|
|
||||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600' rel='stylesheet' type='text/css'>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body, html {
|
|
||||||
background: url('/img/spark-bg.png');
|
|
||||||
background-repeat: repeat;
|
|
||||||
background-size: 300px 200px;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.full-height {
|
|
||||||
min-height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-column {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-fill {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-center {
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.text-center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.links {
|
|
||||||
padding: 1em;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.links a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.links button {
|
|
||||||
background-color: #3097D1;
|
|
||||||
border: 0;
|
|
||||||
border-radius: 4px;
|
|
||||||
color: white;
|
|
||||||
cursor: pointer;
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
padding: 15px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
width: 100px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="full-height flex-column">
|
|
||||||
<nav class="links">
|
|
||||||
<a href="/login" style="margin-right: 15px;">
|
|
||||||
<button>
|
|
||||||
Login
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="/register">
|
|
||||||
<button>
|
|
||||||
Register
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="flex-fill flex-center">
|
|
||||||
<h1 class="text-center">
|
|
||||||
<img src="/img/color-logo.png">
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -15,9 +15,9 @@
|
|||||||
Route::get('image/generic/{width}/{height}/{color}/{name?}','MediaController@image')->name('image');
|
Route::get('image/generic/{width}/{height}/{color}/{name?}','MediaController@image')->name('image');
|
||||||
|
|
||||||
Route::get('/', 'WelcomeController@show');
|
Route::get('/', 'WelcomeController@show');
|
||||||
Route::get('/home', 'HomeController@show');
|
|
||||||
|
|
||||||
Route::group(['middleware'=>['setTheme:adminlte-be']], function() {
|
Route::group(['middleware'=>['setTheme:adminlte-be']], function() {
|
||||||
Route::get('/login', 'Auth\LoginController@showLoginForm');
|
Route::get('/login', 'Auth\LoginController@showLoginForm');
|
||||||
Route::post('/login', 'Auth\LoginController@login');
|
Route::post('/login', 'Auth\LoginController@login');
|
||||||
|
Route::get('/home', 'HomeController@show');
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user