include entrust and some seed data for admin role/user
This commit is contained in:
@@ -52,5 +52,8 @@ class Kernel extends HttpKernel
|
|||||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
|
'role' => \Zizaco\Entrust\Middleware\EntrustRole::class,
|
||||||
|
'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class,
|
||||||
|
'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
8
app/Models/Permission.php
Normal file
8
app/Models/Permission.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Zizaco\Entrust\EntrustPermission;
|
||||||
|
|
||||||
|
class Permission extends EntrustPermission
|
||||||
|
{
|
||||||
|
}
|
||||||
9
app/Models/Role.php
Normal file
9
app/Models/Role.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Zizaco\Entrust\EntrustRole;
|
||||||
|
|
||||||
|
class Role extends EntrustRole
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
|
use Zizaco\Entrust\Traits\EntrustUserTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* App\User
|
* App\User
|
||||||
@@ -17,18 +18,19 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
|
|||||||
* @property \Carbon\Carbon $updated_at
|
* @property \Carbon\Carbon $updated_at
|
||||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
|
||||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $unreadNotifications
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $unreadNotifications
|
||||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereId($value)
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereId($value)
|
||||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereName($value)
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereName($value)
|
||||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereEmail($value)
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereEmail($value)
|
||||||
* @method static \Illuminate\Database\Query\Builder|\App\User wherePassword($value)
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User wherePassword($value)
|
||||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereRememberToken($value)
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereRememberToken($value)
|
||||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereCreatedAt($value)
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereCreatedAt($value)
|
||||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\User whereUpdatedAt($value)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
use Notifiable;
|
use Notifiable;
|
||||||
|
use EntrustUserTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
@@ -6,15 +6,16 @@
|
|||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.0",
|
"php": ">=7.0",
|
||||||
"laravel/framework": "5.3.*",
|
"laravel/framework": "5.4.*",
|
||||||
"yajra/laravel-datatables-oracle": "~6.0",
|
"yajra/laravel-datatables-oracle": "~6.0",
|
||||||
"barryvdh/laravel-ide-helper": "^2.1",
|
"barryvdh/laravel-ide-helper": "^2.1",
|
||||||
"infyomlabs/laravel-generator": "5.3.x-dev",
|
"infyomlabs/laravel-generator": "dev-master",
|
||||||
"laravelcollective/html": "dev-master",
|
"laravelcollective/html": "5.4.x",
|
||||||
"infyomlabs/adminlte-templates": "5.3.x-dev",
|
"infyomlabs/adminlte-templates": "5.3.x-dev",
|
||||||
"infyomlabs/swagger-generator": "dev-master",
|
"infyomlabs/swagger-generator": "dev-master",
|
||||||
"jlapp/swaggervel": "dev-master",
|
"jlapp/swaggervel": "dev-master",
|
||||||
"doctrine/dbal": "~2.3"
|
"doctrine/dbal": "~2.3",
|
||||||
|
"zizaco/entrust": "5.2.x-dev"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
@@ -32,6 +33,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
},
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"tests/TestCase.php"
|
"tests/TestCase.php"
|
||||||
]
|
]
|
||||||
|
|||||||
1371
composer.lock
generated
1371
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -93,8 +93,10 @@ return [
|
|||||||
Collective\Html\HtmlServiceProvider::class,
|
Collective\Html\HtmlServiceProvider::class,
|
||||||
Laracasts\Flash\FlashServiceProvider::class,
|
Laracasts\Flash\FlashServiceProvider::class,
|
||||||
Prettus\Repository\Providers\RepositoryServiceProvider::class,
|
Prettus\Repository\Providers\RepositoryServiceProvider::class,
|
||||||
\InfyOm\Generator\InfyOmGeneratorServiceProvider::class,
|
InfyOm\Generator\InfyOmGeneratorServiceProvider::class,
|
||||||
InfyOm\AdminLTETemplates\AdminLTETemplatesServiceProvider::class,
|
InfyOm\AdminLTETemplates\AdminLTETemplatesServiceProvider::class,
|
||||||
|
Zizaco\Entrust\EntrustServiceProvider::class,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Application Service Providers...
|
* Application Service Providers...
|
||||||
*/
|
*/
|
||||||
@@ -118,6 +120,7 @@ return [
|
|||||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||||
'DB' => Illuminate\Support\Facades\DB::class,
|
'DB' => Illuminate\Support\Facades\DB::class,
|
||||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||||
|
'Entrust' => Zizaco\Entrust\EntrustFacade::class,
|
||||||
'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,
|
||||||
|
|||||||
@@ -47,33 +47,12 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| 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' => [
|
'providers' => [
|
||||||
'users' => [
|
'users' => [
|
||||||
'driver' => 'eloquent',
|
'driver' => 'eloquent',
|
||||||
'model' => App\User::class,
|
'model' => App\Models\User::class,
|
||||||
|
'table' => 'users',
|
||||||
],
|
],
|
||||||
|
|
||||||
// 'users' => [
|
|
||||||
// 'driver' => 'database',
|
|
||||||
// 'table' => 'users',
|
|
||||||
// ],
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
92
config/entrust.php
Normal file
92
config/entrust.php
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of Entrust,
|
||||||
|
* a role & permission management solution for Laravel.
|
||||||
|
*
|
||||||
|
* @license MIT
|
||||||
|
* @package Zizaco\Entrust
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Entrust Role Model
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the Role model used by Entrust to create correct relations. Update
|
||||||
|
| the role if it is in a different namespace.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'role' => 'App\Models\Role',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Entrust Roles Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the roles table used by Entrust to save roles to the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'roles_table' => 'roles',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Entrust Permission Model
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the Permission model used by Entrust to create correct relations.
|
||||||
|
| Update the permission if it is in a different namespace.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'permission' => 'App\Models\Permission',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Entrust Permissions Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the permissions table used by Entrust to save permissions to the
|
||||||
|
| database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'permissions_table' => 'permissions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Entrust permission_role Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the permission_role table used by Entrust to save relationship
|
||||||
|
| between permissions and roles to the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'permission_role_table' => 'permission_role',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Entrust role_user Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the role_user table used by Entrust to save assigned roles to the
|
||||||
|
| database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'role_user_table' => 'role_user',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Foreign key on Entrust's role_user Table (Pivot)
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
'user_foreign_key' => 'user_id',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Role Foreign key on Entrust's role_user Table (Pivot)
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
'role_foreign_key' => 'role_id',
|
||||||
|
|
||||||
|
];
|
||||||
@@ -15,9 +15,7 @@ class CreateUsersTable extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('users', function (Blueprint $table) {
|
Schema::create('users', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('name');
|
$table->string('name')->nullable();
|
||||||
$table->string('first_name')->nullable();
|
|
||||||
$table->string('last_name')->nullable();
|
|
||||||
$table->string('email')->unique();
|
$table->string('email')->unique();
|
||||||
$table->string('password');
|
$table->string('password');
|
||||||
$table->string('code')->nullable();
|
$table->string('code')->nullable();
|
||||||
@@ -32,6 +30,53 @@ class CreateUsersTable extends Migration
|
|||||||
$table->rememberToken();
|
$table->rememberToken();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Create table for storing roles
|
||||||
|
Schema::create('roles', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name')->unique();
|
||||||
|
$table->string('display_name')->nullable();
|
||||||
|
$table->string('description')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create table for associating roles to users (Many-to-Many)
|
||||||
|
Schema::create('role_user', function (Blueprint $table) {
|
||||||
|
$table->integer('user_id')->unsigned();
|
||||||
|
$table->integer('role_id')->unsigned();
|
||||||
|
|
||||||
|
$table->foreign('user_id')->references('id')->on('users')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
$table->foreign('role_id')->references('id')->on('roles')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->primary(['user_id', 'role_id']);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create table for storing permissions
|
||||||
|
Schema::create('permissions', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name')->unique();
|
||||||
|
$table->string('display_name')->nullable();
|
||||||
|
$table->string('description')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create table for associating permissions to roles (Many-to-Many)
|
||||||
|
Schema::create('permission_role', function (Blueprint $table) {
|
||||||
|
$table->integer('permission_id')->unsigned();
|
||||||
|
$table->integer('role_id')->unsigned();
|
||||||
|
|
||||||
|
$table->foreign('permission_id')->references('id')->on('permissions')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
$table->foreign('role_id')->references('id')->on('roles')
|
||||||
|
->onUpdate('cascade')->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->primary(['permission_id', 'role_id']);
|
||||||
|
});
|
||||||
|
|
||||||
|
# create a default user/role
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,5 +87,9 @@ class CreateUsersTable extends Migration
|
|||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::drop('users');
|
Schema::drop('users');
|
||||||
|
Schema::drop('permission_role');
|
||||||
|
Schema::drop('permissions');
|
||||||
|
Schema::drop('role_user');
|
||||||
|
Schema::drop('roles');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Database\Seeds;
|
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
|
||||||
|
|
||||||
class AircraftClassesSeeder extends Seeder
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the database seeds.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function run()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
37
database/seeds/InitialDataSeeder.php
Normal file
37
database/seeds/InitialDataSeeder.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class InitialDataSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$this->user_seeder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add an initial admin user and roles
|
||||||
|
*/
|
||||||
|
protected function user_seeder()
|
||||||
|
{
|
||||||
|
# 2 main groups
|
||||||
|
DB::table('roles')->insert(['id' => 1, 'name' => 'Administrators']);
|
||||||
|
DB::table('roles')->insert(['id' => 2, 'name' => 'Pilots']);
|
||||||
|
|
||||||
|
DB::table('users')->insert([
|
||||||
|
'id' => 1,
|
||||||
|
'name' => 'Admin User',
|
||||||
|
'email' => 'admin@phpvms.net',
|
||||||
|
'password' => bcrypt('admin'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table('role_user')->insert([
|
||||||
|
'user_id' => 1, 'role_id' => 1
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
19
resources/views/vendor/mail/html/button.blade.php
vendored
Normal file
19
resources/views/vendor/mail/html/button.blade.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ $url }}" class="button button-{{ $color or 'blue' }}" target="_blank">{{ $slot }}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
11
resources/views/vendor/mail/html/footer.blade.php
vendored
Normal file
11
resources/views/vendor/mail/html/footer.blade.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table class="footer" align="center" width="570" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="content-cell" align="center">
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
7
resources/views/vendor/mail/html/header.blade.php
vendored
Normal file
7
resources/views/vendor/mail/html/header.blade.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<tr>
|
||||||
|
<td class="header">
|
||||||
|
<a href="{{ $url }}">
|
||||||
|
{{ $slot }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
54
resources/views/vendor/mail/html/layout.blade.php
vendored
Normal file
54
resources/views/vendor/mail/html/layout.blade.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<style>
|
||||||
|
@media only screen and (max-width: 600px) {
|
||||||
|
.inner-body {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 500px) {
|
||||||
|
.button {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<table class="wrapper" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<table class="content" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
{{ $header or '' }}
|
||||||
|
|
||||||
|
<!-- Email Body -->
|
||||||
|
<tr>
|
||||||
|
<td class="body" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0">
|
||||||
|
<!-- Body content -->
|
||||||
|
<tr>
|
||||||
|
<td class="content-cell">
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
|
||||||
|
{{ $subcopy or '' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{{ $footer or '' }}
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
27
resources/views/vendor/mail/html/message.blade.php
vendored
Normal file
27
resources/views/vendor/mail/html/message.blade.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
@component('mail::layout')
|
||||||
|
{{-- Header --}}
|
||||||
|
@slot('header')
|
||||||
|
@component('mail::header', ['url' => config('app.url')])
|
||||||
|
{{ config('app.name') }}
|
||||||
|
@endcomponent
|
||||||
|
@endslot
|
||||||
|
|
||||||
|
{{-- Body --}}
|
||||||
|
{{ $slot }}
|
||||||
|
|
||||||
|
{{-- Subcopy --}}
|
||||||
|
@isset($subcopy)
|
||||||
|
@slot('subcopy')
|
||||||
|
@component('mail::subcopy')
|
||||||
|
{{ $subcopy }}
|
||||||
|
@endcomponent
|
||||||
|
@endslot
|
||||||
|
@endisset
|
||||||
|
|
||||||
|
{{-- Footer --}}
|
||||||
|
@slot('footer')
|
||||||
|
@component('mail::footer')
|
||||||
|
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
||||||
|
@endcomponent
|
||||||
|
@endslot
|
||||||
|
@endcomponent
|
||||||
13
resources/views/vendor/mail/html/panel.blade.php
vendored
Normal file
13
resources/views/vendor/mail/html/panel.blade.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<table class="panel" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="panel-content">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="panel-item">
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
7
resources/views/vendor/mail/html/promotion.blade.php
vendored
Normal file
7
resources/views/vendor/mail/html/promotion.blade.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<table class="promotion" align="center" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
13
resources/views/vendor/mail/html/promotion/button.blade.php
vendored
Normal file
13
resources/views/vendor/mail/html/promotion/button.blade.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ $url }}" class="button button-green" target="_blank">{{ $slot }}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
7
resources/views/vendor/mail/html/subcopy.blade.php
vendored
Normal file
7
resources/views/vendor/mail/html/subcopy.blade.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<table class="subcopy" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
3
resources/views/vendor/mail/html/table.blade.php
vendored
Normal file
3
resources/views/vendor/mail/html/table.blade.php
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<div class="table">
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
</div>
|
||||||
285
resources/views/vendor/mail/html/themes/default.css
vendored
Normal file
285
resources/views/vendor/mail/html/themes/default.css
vendored
Normal file
@@ -0,0 +1,285 @@
|
|||||||
|
/* Base */
|
||||||
|
|
||||||
|
body, body *:not(html):not(style):not(br):not(tr):not(code) {
|
||||||
|
font-family: Avenir, Helvetica, sans-serif;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #f5f8fa;
|
||||||
|
color: #74787E;
|
||||||
|
height: 100%;
|
||||||
|
hyphens: auto;
|
||||||
|
line-height: 1.4;
|
||||||
|
margin: 0;
|
||||||
|
-moz-hyphens: auto;
|
||||||
|
-ms-word-break: break-all;
|
||||||
|
width: 100% !important;
|
||||||
|
-webkit-hyphens: auto;
|
||||||
|
-webkit-text-size-adjust: none;
|
||||||
|
word-break: break-all;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
|
ul,
|
||||||
|
ol,
|
||||||
|
blockquote {
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #3869D4;
|
||||||
|
}
|
||||||
|
|
||||||
|
a img {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Typography */
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #2F3133;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
color: #2F3133;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
color: #2F3133;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: #74787E;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5em;
|
||||||
|
margin-top: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.sub {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Layout */
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
background-color: #f5f8fa;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
-premailer-cellpadding: 0;
|
||||||
|
-premailer-cellspacing: 0;
|
||||||
|
-premailer-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
-premailer-cellpadding: 0;
|
||||||
|
-premailer-cellspacing: 0;
|
||||||
|
-premailer-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header */
|
||||||
|
|
||||||
|
.header {
|
||||||
|
padding: 25px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header a {
|
||||||
|
color: #bbbfc3;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
text-shadow: 0 1px 0 white;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Body */
|
||||||
|
|
||||||
|
.body {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-bottom: 1px solid #EDEFF2;
|
||||||
|
border-top: 1px solid #EDEFF2;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
-premailer-cellpadding: 0;
|
||||||
|
-premailer-cellspacing: 0;
|
||||||
|
-premailer-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inner-body {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0;
|
||||||
|
width: 570px;
|
||||||
|
-premailer-cellpadding: 0;
|
||||||
|
-premailer-cellspacing: 0;
|
||||||
|
-premailer-width: 570px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Subcopy */
|
||||||
|
|
||||||
|
.subcopy {
|
||||||
|
border-top: 1px solid #EDEFF2;
|
||||||
|
margin-top: 25px;
|
||||||
|
padding-top: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subcopy p {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer */
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 570px;
|
||||||
|
-premailer-cellpadding: 0;
|
||||||
|
-premailer-cellspacing: 0;
|
||||||
|
-premailer-width: 570px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer p {
|
||||||
|
color: #AEAEAE;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tables */
|
||||||
|
|
||||||
|
.table table {
|
||||||
|
margin: 30px auto;
|
||||||
|
width: 100%;
|
||||||
|
-premailer-cellpadding: 0;
|
||||||
|
-premailer-cellspacing: 0;
|
||||||
|
-premailer-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table th {
|
||||||
|
border-bottom: 1px solid #EDEFF2;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table td {
|
||||||
|
color: #74787E;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 18px;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-cell {
|
||||||
|
padding: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
|
||||||
|
.action {
|
||||||
|
margin: 30px auto;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
-premailer-cellpadding: 0;
|
||||||
|
-premailer-cellspacing: 0;
|
||||||
|
-premailer-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
border-radius: 3px;
|
||||||
|
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
|
||||||
|
color: #FFF;
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: none;
|
||||||
|
-webkit-text-size-adjust: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-blue {
|
||||||
|
background-color: #3097D1;
|
||||||
|
border-top: 10px solid #3097D1;
|
||||||
|
border-right: 18px solid #3097D1;
|
||||||
|
border-bottom: 10px solid #3097D1;
|
||||||
|
border-left: 18px solid #3097D1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-green {
|
||||||
|
background-color: #2ab27b;
|
||||||
|
border-top: 10px solid #2ab27b;
|
||||||
|
border-right: 18px solid #2ab27b;
|
||||||
|
border-bottom: 10px solid #2ab27b;
|
||||||
|
border-left: 18px solid #2ab27b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-red {
|
||||||
|
background-color: #bf5329;
|
||||||
|
border-top: 10px solid #bf5329;
|
||||||
|
border-right: 18px solid #bf5329;
|
||||||
|
border-bottom: 10px solid #bf5329;
|
||||||
|
border-left: 18px solid #bf5329;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Panels */
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
margin: 0 0 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-content {
|
||||||
|
background-color: #EDEFF2;
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-item {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-item p:last-of-type {
|
||||||
|
margin-bottom: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Promotions */
|
||||||
|
|
||||||
|
.promotion {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border: 2px dashed #9BA2AB;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
margin-top: 25px;
|
||||||
|
padding: 24px;
|
||||||
|
width: 100%;
|
||||||
|
-premailer-cellpadding: 0;
|
||||||
|
-premailer-cellspacing: 0;
|
||||||
|
-premailer-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.promotion h1 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.promotion p {
|
||||||
|
font-size: 15px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
1
resources/views/vendor/mail/markdown/button.blade.php
vendored
Normal file
1
resources/views/vendor/mail/markdown/button.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}: {{ $url }}
|
||||||
1
resources/views/vendor/mail/markdown/footer.blade.php
vendored
Normal file
1
resources/views/vendor/mail/markdown/footer.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
1
resources/views/vendor/mail/markdown/header.blade.php
vendored
Normal file
1
resources/views/vendor/mail/markdown/header.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[{{ $slot }}]({{ $url }})
|
||||||
9
resources/views/vendor/mail/markdown/layout.blade.php
vendored
Normal file
9
resources/views/vendor/mail/markdown/layout.blade.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{!! strip_tags($header) !!}
|
||||||
|
|
||||||
|
{!! strip_tags($slot) !!}
|
||||||
|
@isset($subcopy)
|
||||||
|
|
||||||
|
{!! strip_tags($subcopy) !!}
|
||||||
|
@endisset
|
||||||
|
|
||||||
|
{!! strip_tags($footer) !!}
|
||||||
27
resources/views/vendor/mail/markdown/message.blade.php
vendored
Normal file
27
resources/views/vendor/mail/markdown/message.blade.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
@component('mail::layout')
|
||||||
|
{{-- Header --}}
|
||||||
|
@slot('header')
|
||||||
|
@component('mail::header', ['url' => config('app.url')])
|
||||||
|
{{ config('app.name') }}
|
||||||
|
@endcomponent
|
||||||
|
@endslot
|
||||||
|
|
||||||
|
{{-- Body --}}
|
||||||
|
{{ $slot }}
|
||||||
|
|
||||||
|
{{-- Subcopy --}}
|
||||||
|
@isset($subcopy)
|
||||||
|
@slot('subcopy')
|
||||||
|
@component('mail::subcopy')
|
||||||
|
{{ $subcopy }}
|
||||||
|
@endcomponent
|
||||||
|
@endslot
|
||||||
|
@endisset
|
||||||
|
|
||||||
|
{{-- Footer --}}
|
||||||
|
@slot('footer')
|
||||||
|
@component('mail::footer')
|
||||||
|
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
||||||
|
@endcomponent
|
||||||
|
@endslot
|
||||||
|
@endcomponent
|
||||||
1
resources/views/vendor/mail/markdown/panel.blade.php
vendored
Normal file
1
resources/views/vendor/mail/markdown/panel.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
1
resources/views/vendor/mail/markdown/promotion.blade.php
vendored
Normal file
1
resources/views/vendor/mail/markdown/promotion.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
1
resources/views/vendor/mail/markdown/promotion/button.blade.php
vendored
Normal file
1
resources/views/vendor/mail/markdown/promotion/button.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[{{ $slot }}]({{ $url }})
|
||||||
1
resources/views/vendor/mail/markdown/subcopy.blade.php
vendored
Normal file
1
resources/views/vendor/mail/markdown/subcopy.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
1
resources/views/vendor/mail/markdown/table.blade.php
vendored
Normal file
1
resources/views/vendor/mail/markdown/table.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
Reference in New Issue
Block a user