Merge pull request #697 from nabeelio/673-Laravel-7

Laravel 7 support #673
This commit is contained in:
Nabeel S
2020-05-16 09:37:36 -04:00
committed by GitHub
27 changed files with 1612 additions and 1230 deletions

View File

@@ -6,7 +6,6 @@ language: php
php: php:
- '7.4' - '7.4'
- '7.3' - '7.3'
- '7.2'
#env: #env:
# - DB=mysql # - DB=mysql

View File

@@ -21,9 +21,9 @@
<directory suffix=".php">./app</directory> <directory suffix=".php">./app</directory>
</whitelist> </whitelist>
</filter> </filter>
<listeners> <!--<listeners>
<listener class="NunoMaduro\Collision\Adapters\Phpunit\Listener"/> <listener class="NunoMaduro\Collision\Adapters\Phpunit\Listener"/>
</listeners> </listeners>-->
<php> <php>
<ini name="error_reporting" value="E_ALL"/> <ini name="error_reporting" value="E_ALL"/>
<ini name="display_errors" value="On"/> <ini name="display_errors" value="On"/>

View File

@@ -14,7 +14,7 @@ A full distribution, with all of the composer dependencies, is available at this
## Requirements ## Requirements
- PHP 7.1+, extensions: - PHP 7.3+, extensions:
- cURL - cURL
- JSON - JSON
- mbstring - mbstring

View File

@@ -93,12 +93,12 @@ abstract class Command extends \Illuminate\Console\Command
*/ */
public function runCommand($cmd, $return = false, $verbose = true): string public function runCommand($cmd, $return = false, $verbose = true): string
{ {
if (\is_array($cmd)) { if (!\is_array($cmd)) {
$cmd = implode(' ', $cmd); $cmd = explode(' ', $cmd);
} }
if ($verbose) { if ($verbose) {
$this->info('Running "'.$cmd.'"'); $this->info('Running "'.implode(' ', $cmd).'"');
} }
$val = ''; $val = '';

View File

@@ -2,10 +2,12 @@
namespace App\Contracts; namespace App\Contracts;
use Illuminate\Http\Resources\Json\JsonResource;
/** /**
* Base class for a resource/response * Base class for a resource/response
*/ */
class Resource extends \Illuminate\Http\Resources\Json\Resource class Resource extends JsonResource
{ {
/** /**
* Iterate through the list of $fields and check if they're a "Unit" * Iterate through the list of $fields and check if they're a "Unit"

View File

@@ -3,13 +3,13 @@
namespace App\Exceptions\Converters; namespace App\Exceptions\Converters;
use App\Exceptions\AbstractHttpException; use App\Exceptions\AbstractHttpException;
use Exception; use Throwable;
class GenericExceptionAbstract extends AbstractHttpException class GenericExceptionAbstract extends AbstractHttpException
{ {
private $exception; private $exception;
public function __construct(Exception $exception) public function __construct(Throwable $exception)
{ {
$this->exception = $exception; $this->exception = $exception;
parent::__construct( parent::__construct(

View File

@@ -19,6 +19,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException as SymfonyHttpException; use Symfony\Component\HttpKernel\Exception\HttpException as SymfonyHttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable;
use Whoops\Handler\HandlerInterface; use Whoops\Handler\HandlerInterface;
/** /**
@@ -42,12 +43,12 @@ class Handler extends ExceptionHandler
/** /**
* Render an exception into an HTTP response. * Render an exception into an HTTP response.
* *
* @param Request $request * @param Request $request
* @param Exception $exception * @param \Throwable $exception
* *
* @return mixed * @return mixed
*/ */
public function render($request, Exception $exception) public function render($request, Throwable $exception)
{ {
if ($request->is('api/*')) { if ($request->is('api/*')) {
return $this->handleApiError($request, $exception); return $this->handleApiError($request, $exception);
@@ -65,11 +66,11 @@ class Handler extends ExceptionHandler
* Handle errors in the API * Handle errors in the API
* *
* @param $request * @param $request
* @param \Exception $exception * @param \Throwable $exception
* *
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response
*/ */
private function handleApiError($request, Exception $exception) private function handleApiError($request, Throwable $exception)
{ {
Log::error('API Error', $exception->getTrace()); Log::error('API Error', $exception->getTrace());

View File

@@ -2,7 +2,7 @@
namespace App\Http\Resources; namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\Resource; use App\Contracts\Resource;
/** /**
* @mixin \App\Models\SimBrief * @mixin \App\Models\SimBrief

View File

@@ -8,34 +8,33 @@
"prefer-stable": true, "prefer-stable": true,
"homepage": "http://www.phpvms.net", "homepage": "http://www.phpvms.net",
"require": { "require": {
"php": ">=7.2", "php": ">=7.3",
"ext-json": "*", "ext-json": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
"ext-bcmath": "*", "ext-bcmath": "*",
"ext-pdo": "*", "ext-pdo": "*",
"composer/composer": "~1.8.0", "composer/composer": "~1.0",
"composer/installers": "~1.0", "composer/installers": "~1.0",
"laravel/framework": "~6.0", "laravel/framework": "~7.0",
"akaunting/money": "^1.0", "akaunting/money": "^1.0",
"anhskohbo/no-captcha": "^3.0", "anhskohbo/no-captcha": "^3.0",
"appstract/laravel-opcache": "^2.0", "appstract/laravel-opcache": "^4.0",
"arrilot/laravel-widgets": "~3.13.0", "arrilot/laravel-widgets": "~3.13.0",
"codedge/laravel-selfupdater": "~2.5.1", "codedge/laravel-selfupdater": "~3.0.0",
"doctrine/dbal": "~2.9.2", "doctrine/dbal": "~2.9.2",
"elcobvg/laravel-opcache": "~0.4", "facade/ignition": "^2.0",
"facade/ignition": "^1.6",
"fideloper/proxy": "^4.3", "fideloper/proxy": "^4.3",
"guzzlehttp/guzzle": "~6.3.3", "guzzlehttp/guzzle": "~6.5",
"hashids/hashids": "^2.0.0", "hashids/hashids": "^2.0.0",
"igaster/laravel-theme": "^2.0", "igaster/laravel-theme": "^2.0",
"intervention/image": "2.4.*", "intervention/image": "2.4.*",
"irazasyed/laravel-gamp": "^1.4", "irazasyed/laravel-gamp": "^1.6",
"jmikola/geojson": "1.0.*", "jmikola/geojson": "1.0.*",
"joshbrw/laravel-module-installer": "0.1.*", "joshbrw/laravel-module-installer": "0.1.*",
"laracasts/flash": "^3.0", "laracasts/flash": "^3.1",
"laravel/helpers": "^1.0", "laravel/helpers": "^1.2",
"laravelcollective/html": "~6.0.0", "laravelcollective/html": "~6.1.0",
"layershifter/tld-extract": "^2.0", "layershifter/tld-extract": "^2.0",
"league/csv": "9.2.*", "league/csv": "9.2.*",
"league/geotools": "0.8.*", "league/geotools": "0.8.*",
@@ -43,35 +42,36 @@
"markrogoyski/math-php": "^0.38.0", "markrogoyski/math-php": "^0.38.0",
"myclabs/deep-copy": "~1.9.0", "myclabs/deep-copy": "~1.9.0",
"nabeel/vacentral": "~2.0", "nabeel/vacentral": "~2.0",
"nwidart/laravel-modules": "^6.0", "nwidart/laravel-modules": "^7.0",
"php-units-of-measure/php-units-of-measure": "~2.1.0", "php-units-of-measure/php-units-of-measure": "~2.1.0",
"phpvms/sample-module": "^1.0", "phpvms/sample-module": "^1.0",
"pragmarx/version": "0.2.*", "pragmarx/version": "^1.2.2",
"prettus/l5-repository": "~2.6.0", "prettus/l5-repository": "~2.6.0",
"santigarcor/laratrust": "~5.2.0", "santigarcor/laratrust": "~6.0",
"sebastiaanluca/laravel-helpers": "~4.0", "sebastiaanluca/laravel-helpers": "~5.0",
"semver/semver": "~1.1.0", "semver/semver": "~1.1.0",
"spatie/laravel-backup": "~6.3", "spatie/laravel-backup": "~6.9.0",
"spatie/valuestore": "~1.2.3", "spatie/valuestore": "~1.2.3",
"symfony/polyfill-iconv": "~1.12", "symfony/polyfill-iconv": "~1.17.0",
"theiconic/php-ga-measurement-protocol": "2.7.*", "theiconic/php-ga-measurement-protocol": "2.7.*",
"tivie/php-os-detector": "~1.1.0", "tivie/php-os-detector": "~1.1.0",
"vlucas/phpdotenv": "v3.6.0", "vlucas/phpdotenv": "v4.0",
"webpatser/laravel-uuid": "~3.0", "webpatser/laravel-uuid": "~3.0",
"oomphinc/composer-installers-extender": "^1.1" "oomphinc/composer-installers-extender": "^1.1",
"laravel/ui": "^2.0"
}, },
"require-dev": { "require-dev": {
"barryvdh/laravel-debugbar": "^3.0", "barryvdh/laravel-debugbar": "^3.0",
"barryvdh/laravel-ide-helper": "^2.6", "barryvdh/laravel-ide-helper": "^2.6",
"bpocallaghan/generators": "5.0.1", "bpocallaghan/generators": "~6.0",
"codedungeon/phpunit-result-printer": "^0.13.0",
"filp/whoops": "~2.0", "filp/whoops": "~2.0",
"fzaninotto/faker": "~1.9.0", "fzaninotto/faker": "~1.9.0",
"friendsofphp/php-cs-fixer": "^2.16", "friendsofphp/php-cs-fixer": "^2.16",
"mockery/mockery": "0.9.*", "mockery/mockery": "0.9.*",
"nunomaduro/collision": "^3.0", "nunomaduro/collision": "^4.0",
"phpunit/phpunit": "~8.3", "phpunit/phpunit": "~8.3",
"squizlabs/php_codesniffer": "3.*" "squizlabs/php_codesniffer": "3.*",
"sempro/phpunit-pretty-print": "^1.2"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [

2300
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -17,31 +17,43 @@ return [
'driver' => env('MAIL_DRIVER', 'smtp'), 'driver' => env('MAIL_DRIVER', 'smtp'),
/* 'mailers' => [
|-------------------------------------------------------------------------- 'smtp' => [
| SMTP Host Address 'transport' => 'smtp',
|-------------------------------------------------------------------------- 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
| 'port' => env('MAIL_PORT', 587),
| Here you may provide the host address of the SMTP server used by your 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
| applications. A default option is provided that is compatible with 'username' => env('MAIL_USERNAME'),
| the Mailgun mail service which will provide reliable deliveries. 'password' => env('MAIL_PASSWORD'),
| 'timeout' => null,
*/ ],
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'ses' => [
'transport' => 'seapp/Contracts/Command.php:105s',
],
/* 'mailgun' => [
|-------------------------------------------------------------------------- 'transport' => 'mailgun',
| SMTP Host Port ],
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587), 'postmark' => [
'transport' => 'postmark',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@@ -59,56 +71,4 @@ return [
'address' => env('MAIL_FROM_ADDRESS', 'no-reply@phpvms.net'), 'address' => env('MAIL_FROM_ADDRESS', 'no-reply@phpvms.net'),
], ],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
/*
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
]; ];

View File

@@ -27,6 +27,6 @@ return [
'cookie' => 'phpvms_session', 'cookie' => 'phpvms_session',
'path' => '/', 'path' => '/',
'domain' => env('SESSION_DOMAIN', null), 'domain' => env('SESSION_DOMAIN', null),
'secure' => false, 'secure' => env('SESSION_SECURE_COOKIE', null),
'http_only' => true, 'http_only' => true,
]; ];

View File

@@ -1,5 +1,6 @@
version_source: config version_source: config
current: current:
label: ''
major: 7 major: 7
minor: 0 minor: 0
patch: 0 patch: 0

View File

@@ -2,7 +2,7 @@
return [ return [
'php' => [ 'php' => [
'version' => '7.2', 'version' => '7.3',
], ],
'cache' => [ 'cache' => [

View File

@@ -7,8 +7,8 @@
convertNoticesToExceptions="false" convertNoticesToExceptions="false"
convertWarningsToExceptions="false" convertWarningsToExceptions="false"
beStrictAboutOutputDuringTests="false" beStrictAboutOutputDuringTests="false"
beStrictAboutTestsThatDoNotTestAnything="false"> beStrictAboutTestsThatDoNotTestAnything="false"
<!--printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer"--> printerClass="Sempro\PHPUnitPrettyPrinter\PrettyPrinter">
<testsuites> <testsuites>
<testsuite name="Application Test Suite"> <testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory> <directory suffix="Test.php">./tests</directory>
@@ -17,18 +17,19 @@
<extensions> <extensions>
<extension class="Tests\Bootstrap"/> <extension class="Tests\Bootstrap"/>
</extensions> </extensions>
<listeners> <!--<listeners>
<listener class="NunoMaduro\Collision\Adapters\Phpunit\Listener"/> <listener class="NunoMaduro\Collision\Adapters\Phpunit\Listener"/>
</listeners> </listeners>-->
<filter> <filter>
<whitelist processUncoveredFilesFromWhitelist="true"> <whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory> <directory suffix=".php">./app</directory>
</whitelist> </whitelist>
</filter> </filter>
<php> <php>
<ini name="error_reporting" value="E_ALL" /> <env name="PHPUNIT_PRETTY_PRINT_PROGRESS" value="true" />
<ini name="display_errors" value="On" /> <ini name="error_reporting" value="E_ALL"/>
<ini name="display_startup_errors" value="On" /> <ini name="display_errors" value="On"/>
<ini name="display_startup_errors" value="On"/>
<server name="APP_ENV" value="testing"/> <server name="APP_ENV" value="testing"/>
<server name="APP_KEY" value="base64:ve66Z5Kt/zTN3p++0zOPu854PHfZkwJE5VuoFAlzHtI="/> <server name="APP_KEY" value="base64:ve66Z5Kt/zTN3p++0zOPu854PHfZkwJE5VuoFAlzHtI="/>
<server name="APP_DEBUG" value="true"/> <server name="APP_DEBUG" value="true"/>

View File

@@ -80,15 +80,29 @@ return [
// Overrides config/mail.php // Overrides config/mail.php
'mail' => [ 'mail' => [
'driver' => 'mail', 'driver' => 'mail', # Default is to use the mail() fn
'host' => '', 'mailers' => [
'port' => 587, 'smtp' => [
'transport' => 'smtp',
'host' => '',
'port' => '',
'encryption' => '',
'username' => '',
'password' => '',
'timeout' => null,
],
'mailgun' => [
'transport' => 'mailgun',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
],
'from' => [ 'from' => [
'name' => '', 'name' => 'phpVMS No-Reply',
'address' => 'no-reply@phpvms.net', 'address' => 'no-reply@phpvms.net',
], ],
'username' => '',
'password' => '',
], ],
// Overrides config/session.php // Overrides config/session.php

View File

@@ -2,7 +2,7 @@
namespace $NAMESPACE$; namespace $NAMESPACE$;
use Illuminate\Http\Resources\Json\Resource; use App\Contracts\Resource;
/** /**
* Class $CLASS$ * Class $CLASS$

View File

@@ -22,9 +22,10 @@
<div class="row" style="margin-bottom: 20px;"> <div class="row" style="margin-bottom: 20px;">
<div class="col-xs-12 text-center"> <div class="col-xs-12 text-center">
<a class="small" <a class="small"
data-container="body" style="cursor: pointer"
data-toggle="popover" data-container="body"
data-placement="right" data-toggle="popover"
data-placement="right"
data-content="{{$version_full}}"> data-content="{{$version_full}}">
version {{ $version }} version {{ $version }}
</a> </a>

View File

@@ -1,13 +1,14 @@
<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0"> <table class="action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td align="center"> <td align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td align="center"> <td align="center">
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td> <td>
<a href="{{ $url }}" class="button button-{{ $color or 'blue' }}" target="_blank">{{ $slot }}</a> <a href="{{ $url }}" class="button button-{{ $color ?? 'primary' }}" target="_blank"
rel="noopener">{{ $slot }}</a>
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -1,6 +1,6 @@
<tr> <tr>
<td> <td>
<table class="footer" align="center" width="570" cellpadding="0" cellspacing="0"> <table class="footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td class="content-cell" align="center"> <td class="content-cell" align="center">
{{ Illuminate\Mail\Markdown::parse($slot) }} {{ Illuminate\Mail\Markdown::parse($slot) }}

View File

@@ -1,7 +1,11 @@
<tr> <tr>
<td class="header"> <td class="header">
<a href="{{ $url }}"> <a href="{{ $url }}" style="display: inline-block;">
{{ $slot }} @if (trim($slot) === 'Laravel')
<img src="https://laravel.com/img/notification-logo.png" class="logo" alt="Laravel Logo">
@else
{{ $slot }}
@endif
</a> </a>
</td> </td>
</tr> </tr>

View File

@@ -24,29 +24,29 @@
} }
</style> </style>
<table class="wrapper" width="100%" cellpadding="0" cellspacing="0"> <table class="wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td align="center"> <td align="center">
<table class="content" width="100%" cellpadding="0" cellspacing="0"> <table class="content" width="100%" cellpadding="0" cellspacing="0" role="presentation">
{{ $header or '' }} {{ $header ?? '' }}
<!-- Email Body --> <!-- Email Body -->
<tr> <tr>
<td class="body" width="100%" cellpadding="0" cellspacing="0"> <td class="body" width="100%" cellpadding="0" cellspacing="0">
<table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0"> <table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
<!-- Body content --> <!-- Body content -->
<tr> <tr>
<td class="content-cell"> <td class="content-cell">
{{ Illuminate\Mail\Markdown::parse($slot) }} {{ Illuminate\Mail\Markdown::parse($slot) }}
{{ $subcopy or '' }} {{ $subcopy ?? '' }}
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
{{ $footer or '' }} {{ $footer ?? '' }}
</table> </table>
</td> </td>
</tr> </tr>

View File

@@ -1,27 +1,27 @@
@component('mail::layout') @component('mail::layout')
{{-- Header --}} {{-- Header --}}
@slot('header') @slot('header')
@component('mail::header', ['url' => config('app.url')]) @component('mail::header', ['url' => config('app.url')])
{{ config('app.name') }} {{ config('app.name') }}
@endcomponent @endcomponent
@endslot @endslot
{{-- Body --}} {{-- Body --}}
{{ $slot }} {{ $slot }}
{{-- Subcopy --}} {{-- Subcopy --}}
@isset($subcopy) @isset($subcopy)
@slot('subcopy') @slot('subcopy')
@component('mail::subcopy') @component('mail::subcopy')
{{ $subcopy }} {{ $subcopy }}
@endcomponent @endcomponent
@endslot @endslot
@endisset @endisset
{{-- Footer --}} {{-- Footer --}}
@slot('footer') @slot('footer')
@component('mail::footer') @component('mail::footer')
&copy; {{ date('Y') }} {{ config('app.name') }}. All rights reserved. © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
@endcomponent @endcomponent
@endslot @endslot
@endcomponent @endcomponent

View File

@@ -1,7 +1,7 @@
<table class="panel" width="100%" cellpadding="0" cellspacing="0"> <table class="panel" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td class="panel-content"> <td class="panel-content">
<table width="100%" cellpadding="0" cellspacing="0"> <table width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td class="panel-item"> <td class="panel-item">
{{ Illuminate\Mail\Markdown::parse($slot) }} {{ Illuminate\Mail\Markdown::parse($slot) }}
@@ -11,3 +11,4 @@
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -1,4 +1,4 @@
<table class="subcopy" width="100%" cellpadding="0" cellspacing="0"> <table class="subcopy" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr> <tr>
<td> <td>
{{ Illuminate\Mail\Markdown::parse($slot) }} {{ Illuminate\Mail\Markdown::parse($slot) }}

View File

@@ -1,24 +1,22 @@
/* Base */ /* Base */
body, body *:not(html):not(style):not(br):not(tr):not(code) { body,
font-family: Avenir, Helvetica, sans-serif; body *:not(html):not(style):not(br):not(tr):not(code) {
box-sizing: border-box; box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
position: relative;
} }
body { body {
background-color: #f5f8fa; -webkit-text-size-adjust: none;
color: #74787E; background-color: #ffffff;
color: #718096;
height: 100%; height: 100%;
hyphens: auto;
line-height: 1.4; line-height: 1.4;
margin: 0; margin: 0;
-moz-hyphens: auto; padding: 0;
-ms-word-break: break-all;
width: 100% !important; width: 100% !important;
-webkit-hyphens: auto;
-webkit-text-size-adjust: none;
word-break: break-all;
word-break: break-word;
} }
p, p,
@@ -30,7 +28,7 @@ blockquote {
} }
a { a {
color: #3869D4; color: #3869d4;
} }
a img { a img {
@@ -40,15 +38,14 @@ a img {
/* Typography */ /* Typography */
h1 { h1 {
color: #2F3133; color: #3d4852;
font-size: 19px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin-top: 0; margin-top: 0;
text-align: left; text-align: left;
} }
h2 { h2 {
color: #2F3133;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
margin-top: 0; margin-top: 0;
@@ -56,7 +53,6 @@ h2 {
} }
h3 { h3 {
color: #2F3133;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin-top: 0; margin-top: 0;
@@ -64,7 +60,6 @@ h3 {
} }
p { p {
color: #74787E;
font-size: 16px; font-size: 16px;
line-height: 1.5em; line-height: 1.5em;
margin-top: 0; margin-top: 0;
@@ -82,22 +77,22 @@ img {
/* Layout */ /* Layout */
.wrapper { .wrapper {
background-color: #f5f8fa;
margin: 0;
padding: 0;
width: 100%;
-premailer-cellpadding: 0; -premailer-cellpadding: 0;
-premailer-cellspacing: 0; -premailer-cellspacing: 0;
-premailer-width: 100%; -premailer-width: 100%;
background-color: #edf2f7;
margin: 0;
padding: 0;
width: 100%;
} }
.content { .content {
margin: 0;
padding: 0;
width: 100%;
-premailer-cellpadding: 0; -premailer-cellpadding: 0;
-premailer-cellspacing: 0; -premailer-cellspacing: 0;
-premailer-width: 100%; -premailer-width: 100%;
margin: 0;
padding: 0;
width: 100%;
} }
/* Header */ /* Header */
@@ -108,149 +103,176 @@ img {
} }
.header a { .header a {
color: #bbbfc3; color: #3d4852;
font-size: 19px; font-size: 19px;
font-weight: bold; font-weight: bold;
text-decoration: none; text-decoration: none;
text-shadow: 0 1px 0 white; }
/* Logo */
.logo {
height: 75px;
width: 75px;
} }
/* Body */ /* Body */
.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-cellpadding: 0;
-premailer-cellspacing: 0; -premailer-cellspacing: 0;
-premailer-width: 100%; -premailer-width: 100%;
background-color: #edf2f7;
border-bottom: 1px solid #edf2f7;
border-top: 1px solid #edf2f7;
margin: 0;
padding: 0;
width: 100%;
} }
.inner-body { .inner-body {
background-color: #FFFFFF;
margin: 0 auto;
padding: 0;
width: 570px;
-premailer-cellpadding: 0; -premailer-cellpadding: 0;
-premailer-cellspacing: 0; -premailer-cellspacing: 0;
-premailer-width: 570px; -premailer-width: 570px;
background-color: #ffffff;
border-color: #e8e5ef;
border-radius: 2px;
border-width: 1px;
box-shadow: 0 2px 0 rgba(0, 0, 150, 0.025), 2px 4px 0 rgba(0, 0, 150, 0.015);
margin: 0 auto;
padding: 0;
width: 570px;
} }
/* Subcopy */ /* Subcopy */
.subcopy { .subcopy {
border-top: 1px solid #EDEFF2; border-top: 1px solid #e8e5ef;
margin-top: 25px; margin-top: 25px;
padding-top: 25px; padding-top: 25px;
} }
.subcopy p { .subcopy p {
font-size: 12px; font-size: 14px;
} }
/* Footer */ /* Footer */
.footer { .footer {
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 570px;
margin: 0 auto; margin: 0 auto;
padding: 0; padding: 0;
text-align: center; text-align: center;
width: 570px; width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 570px;
} }
.footer p { .footer p {
color: #AEAEAE; color: #b0adc5;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
} }
.footer a {
color: #b0adc5;
text-decoration: underline;
}
/* Tables */ /* Tables */
.table table { .table table {
margin: 30px auto;
width: 100%;
-premailer-cellpadding: 0; -premailer-cellpadding: 0;
-premailer-cellspacing: 0; -premailer-cellspacing: 0;
-premailer-width: 100%; -premailer-width: 100%;
margin: 30px auto;
width: 100%;
} }
.table th { .table th {
border-bottom: 1px solid #EDEFF2; border-bottom: 1px solid #edeff2;
margin: 0;
padding-bottom: 8px; padding-bottom: 8px;
} }
.table td { .table td {
color: #74787E; color: #74787e;
font-size: 15px; font-size: 15px;
line-height: 18px; line-height: 18px;
margin: 0;
padding: 10px 0; padding: 10px 0;
} }
.content-cell { .content-cell {
padding: 35px; max-width: 100vw;
padding: 32px;
} }
/* Buttons */ /* Buttons */
.action { .action {
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
margin: 30px auto; margin: 30px auto;
padding: 0; padding: 0;
text-align: center; text-align: center;
width: 100%; width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
} }
.button { .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; -webkit-text-size-adjust: none;
border-radius: 4px;
color: #fff;
display: inline-block;
overflow: hidden;
text-decoration: none;
} }
.button-blue { .button-blue,
background-color: #3097D1; .button-primary {
border-top: 10px solid #3097D1; background-color: #2d3748;
border-right: 18px solid #3097D1; border-bottom: 8px solid #2d3748;
border-bottom: 10px solid #3097D1; border-left: 18px solid #2d3748;
border-left: 18px solid #3097D1; border-right: 18px solid #2d3748;
border-top: 8px solid #2d3748;
} }
.button-green { .button-green,
background-color: #2ab27b; .button-success {
border-top: 10px solid #2ab27b; background-color: #48bb78;
border-right: 18px solid #2ab27b; border-bottom: 8px solid #48bb78;
border-bottom: 10px solid #2ab27b; border-left: 18px solid #48bb78;
border-left: 18px solid #2ab27b; border-right: 18px solid #48bb78;
border-top: 8px solid #48bb78;
} }
.button-red { .button-red,
background-color: #bf5329; .button-error {
border-top: 10px solid #bf5329; background-color: #e53e3e;
border-right: 18px solid #bf5329; border-bottom: 8px solid #e53e3e;
border-bottom: 10px solid #bf5329; border-left: 18px solid #e53e3e;
border-left: 18px solid #bf5329; border-right: 18px solid #e53e3e;
border-top: 8px solid #e53e3e;
} }
/* Panels */ /* Panels */
.panel { .panel {
margin: 0 0 21px; border-left: #2d3748 solid 4px;
margin: 21px 0;
} }
.panel-content { .panel-content {
background-color: #EDEFF2; background-color: #edf2f7;
color: #718096;
padding: 16px; padding: 16px;
} }
.panel-content p {
color: #718096;
}
.panel-item { .panel-item {
padding: 0; padding: 0;
} }
@@ -260,26 +282,8 @@ img {
padding-bottom: 0; padding-bottom: 0;
} }
/* Promotions */ /* Utilities */
.promotion { .break-all {
background-color: #FFFFFF; word-break: break-all;
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;
} }

View File

@@ -2,13 +2,16 @@
use App\Repositories\SettingRepository; use App\Repositories\SettingRepository;
use App\Services\DatabaseService; use App\Services\DatabaseService;
use Carbon\Carbon;
use GuzzleHttp\Client; use GuzzleHttp\Client;
use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack; use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
use Illuminate\Routing\Middleware\ThrottleRequests; use Illuminate\Routing\Middleware\ThrottleRequests;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use Illuminate\Testing\TestResponse;
use Tests\CreatesApplication; use Tests\CreatesApplication;
use Tests\TestData; use Tests\TestData;
@@ -246,9 +249,9 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
* @param array $headers * @param array $headers
* @param null $user * @param null $user
* *
* @return \Illuminate\Foundation\Testing\TestResponse * @return Illuminate\Testing\TestResponse
*/ */
public function get($uri, array $headers = [], $user = null): \Illuminate\Foundation\Testing\TestResponse public function get($uri, array $headers = [], $user = null): Illuminate\Testing\TestResponse
{ {
$req = parent::get($uri, $this->headers($user, $headers)); $req = parent::get($uri, $this->headers($user, $headers));
if ($req->isClientError() || $req->isServerError()) { if ($req->isClientError() || $req->isServerError()) {
@@ -266,9 +269,9 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
* @param array $headers * @param array $headers
* @param null $user * @param null $user
* *
* @return \Illuminate\Foundation\Testing\TestResponse * @return TestResponse
*/ */
public function post($uri, array $data = [], array $headers = [], $user = null) public function post($uri, array $data = [], array $headers = [], $user = null): TestResponse
{ {
$data = $this->transformData($data); $data = $this->transformData($data);
$req = parent::post($uri, $data, $this->headers($user, $headers)); $req = parent::post($uri, $data, $this->headers($user, $headers));
@@ -287,9 +290,9 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
* @param array $headers * @param array $headers
* @param null $user * @param null $user
* *
* @return \Illuminate\Foundation\Testing\TestResponse * @return TestResponse
*/ */
public function put($uri, array $data = [], array $headers = [], $user = null) public function put($uri, array $data = [], array $headers = [], $user = null): TestResponse
{ {
$req = parent::put($uri, $this->transformData($data), $this->headers($user, $headers)); $req = parent::put($uri, $this->transformData($data), $this->headers($user, $headers));
if ($req->isClientError() || $req->isServerError()) { if ($req->isClientError() || $req->isServerError()) {
@@ -307,9 +310,9 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
* @param array $headers * @param array $headers
* @param null $user * @param null $user
* *
* @return \Illuminate\Foundation\Testing\TestResponse * @return TestResponse
*/ */
public function delete($uri, array $data = [], array $headers = [], $user = null) public function delete($uri, array $data = [], array $headers = [], $user = null): TestResponse
{ {
$req = parent::delete($uri, $this->transformData($data), $this->headers($user, $headers)); $req = parent::delete($uri, $this->transformData($data), $this->headers($user, $headers));
if ($req->isClientError() || $req->isServerError()) { if ($req->isClientError() || $req->isServerError()) {