From e62603a1b3ffac4fb734c867b33e72fab2fbc381 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 21 Jan 2020 20:59:10 +1100 Subject: [PATCH] Email template work --- app/Console/Commands/TestEmail.php | 49 + app/Http/Controllers/Auth/LoginController.php | 2 +- app/Mail/SocialLink.php | 6 +- app/Mail/TestEmail.php | 41 + app/Models/Site.php | 9 + composer.json | 5 +- composer.lock | 935 +++++++++--------- config/mail-auto-embed.php | 28 + config/mail.php | 1 + .../views/email/system/social_link.blade.php | 15 +- .../views/email/system/test_email.blade.php | 11 + .../views/vendor/mail/html/footer.blade.php | 3 + .../views/vendor/mail/html/header.blade.php | 13 +- .../views/vendor/mail/html/layout.blade.php | 59 +- .../views/vendor/mail/html/message.blade.php | 10 +- .../views/vendor/mail/html/panel.blade.php | 5 + .../views/vendor/mail/html/subcopy.blade.php | 3 + .../views/vendor/mail/html/themes/default.css | 396 +++----- 18 files changed, 799 insertions(+), 792 deletions(-) create mode 100644 app/Console/Commands/TestEmail.php create mode 100644 app/Mail/TestEmail.php create mode 100644 config/mail-auto-embed.php create mode 100644 resources/views/email/system/test_email.blade.php create mode 100644 resources/views/vendor/mail/html/footer.blade.php create mode 100644 resources/views/vendor/mail/html/panel.blade.php create mode 100644 resources/views/vendor/mail/html/subcopy.blade.php diff --git a/app/Console/Commands/TestEmail.php b/app/Console/Commands/TestEmail.php new file mode 100644 index 0000000..ff3e34a --- /dev/null +++ b/app/Console/Commands/TestEmail.php @@ -0,0 +1,49 @@ +argument('id')); + + Mail::to($uo->email) + ->send(new MailTest($uo)); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 834be17..4eac661 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -49,4 +49,4 @@ class LoginController extends Controller return view('adminlte::auth.login')->with('login_note',$login_note); } -} +} \ No newline at end of file diff --git a/app/Mail/SocialLink.php b/app/Mail/SocialLink.php index 8e2b264..72b5317 100644 --- a/app/Mail/SocialLink.php +++ b/app/Mail/SocialLink.php @@ -25,7 +25,7 @@ class SocialLink extends Mailable public function __construct(AccountOauth $o) { $this->token = $o->link_token; - $this->user = $o; + $this->user = $o->account->user; } /** @@ -38,6 +38,8 @@ class SocialLink extends Mailable return $this ->markdown('email.system.social_link') ->subject('Link your Account') - ->with(['site'=>$this->user->site]); + ->with([ + 'site'=>$this->user->site, + ]); } } \ No newline at end of file diff --git a/app/Mail/TestEmail.php b/app/Mail/TestEmail.php new file mode 100644 index 0000000..ea1aae9 --- /dev/null +++ b/app/Mail/TestEmail.php @@ -0,0 +1,41 @@ +user = $o; + } + + /** + * Build the message. + * + * @return $this + */ + public function build() + { + return $this + ->markdown('email.system.test_email') + ->subject('Just a test...') + ->with([ + 'site'=>$this->user->site, + 'user'=>$this->user, + ]); + } +} diff --git a/app/Models/Site.php b/app/Models/Site.php index 07991fc..0c18083 100644 --- a/app/Models/Site.php +++ b/app/Models/Site.php @@ -76,6 +76,15 @@ class Site extends Model return Arr::get($default,$key); } + public function getEmailLogoAttribute() + { + //$return = $this->getSiteDetailValue('email_logo')->value; + // @todo Get from the DB. + $return = 'site/1/gthpl-white.png'; + + return $return ? 'storage/'.$return : '/image/generic/150/20/fff'; + } + public function getSiteLogoAttribute() { $return = $this->getSiteDetailValue('site_logo')->value; diff --git a/composer.json b/composer.json index 81ec55d..1905a36 100644 --- a/composer.json +++ b/composer.json @@ -9,9 +9,9 @@ "license": "MIT", "require": { "php": "^7.2", - "barryvdh/laravel-debugbar": "^3.2", "barryvdh/laravel-snappy": "^0.4.6", "clarkeash/doorman": "^4.0", + "eduardokum/laravel-mail-auto-embed": "^1.0", "fideloper/proxy": "^4.0", "h4cc/wkhtmltoimage-amd64": "^0.12.4", "h4cc/wkhtmltopdf-amd64": "^0.12.4", @@ -19,14 +19,15 @@ "laravel/framework": "^6.4", "laravel/passport": "^8.2", "laravel/socialite": "^4.2", - "laravel/tinker": "^1.0", "leenooks/laravel": "^6.0", "spatie/laravel-demo-mode": "^2.5", "spinen/laravel-quickbooks-client": "^3.1" }, "require-dev": { + "barryvdh/laravel-debugbar": "^3.2", "facade/ignition": "1.11.1", "fzaninotto/faker": "^1.4", + "laravel/tinker": "^1.0", "mockery/mockery": "^1.0", "nunomaduro/collision": "^3.0", "phpunit/phpunit": "^8.0" diff --git a/composer.lock b/composer.lock index 917faed..1584965 100644 --- a/composer.lock +++ b/composer.lock @@ -4,76 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "259eb57b25f43c2d10f401255d575e7e", + "content-hash": "d300291216a46d23aed0973b046954ec", "packages": [ - { - "name": "barryvdh/laravel-debugbar", - "version": "v3.2.8", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "18208d64897ab732f6c04a19b319fe8f1d57a9c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/18208d64897ab732f6c04a19b319fe8f1d57a9c0", - "reference": "18208d64897ab732f6c04a19b319fe8f1d57a9c0", - "shasum": "" - }, - "require": { - "illuminate/routing": "^5.5|^6", - "illuminate/session": "^5.5|^6", - "illuminate/support": "^5.5|^6", - "maximebf/debugbar": "~1.15.0", - "php": ">=7.0", - "symfony/debug": "^3|^4", - "symfony/finder": "^3|^4" - }, - "require-dev": { - "laravel/framework": "5.5.x" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\Debugbar\\ServiceProvider" - ], - "aliases": { - "Debugbar": "Barryvdh\\Debugbar\\Facade" - } - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\Debugbar\\": "src/" - }, - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "PHP Debugbar integration for Laravel", - "keywords": [ - "debug", - "debugbar", - "laravel", - "profiler", - "webprofiler" - ], - "time": "2019-08-29T07:01:03+00:00" - }, { "name": "barryvdh/laravel-snappy", "version": "v0.4.6", @@ -304,39 +236,6 @@ ], "time": "2018-07-24T23:27:56+00:00" }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "time": "2019-12-04T15:06:13+00:00" - }, { "name": "doctrine/inflector", "version": "1.3.1", @@ -520,6 +419,61 @@ ], "time": "2019-03-31T00:38:28+00:00" }, + { + "name": "eduardokum/laravel-mail-auto-embed", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/eduardokum/laravel-mail-auto-embed.git", + "reference": "918c3aff220d965fbaee96ae4d48a09036381bdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/eduardokum/laravel-mail-auto-embed/zipball/918c3aff220d965fbaee96ae4d48a09036381bdf", + "reference": "918c3aff220d965fbaee96ae4d48a09036381bdf", + "shasum": "" + }, + "require": { + "illuminate/contracts": ">=5.3", + "illuminate/mail": ">=5.3", + "illuminate/support": ">=5.3", + "php": ">=5.5.0" + }, + "require-dev": { + "orchestra/testbench": "~3.0", + "phpunit/phpunit": "~5.0|~6.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Eduardokum\\LaravelMailAutoEmbed\\ServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Eduardokum\\LaravelMailAutoEmbed\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gusmão", + "email": "eduguscontra3@hotmail.com" + } + ], + "description": "Library for embed images in emails automatically", + "homepage": "https://github.com/eduardokum/laravel-mail-auto-embed", + "keywords": [ + "eduardokum", + "laravel-mail-auto-embed" + ], + "time": "2017-09-21T12:11:32+00:00" + }, { "name": "egulias/email-validator", "version": "2.1.14", @@ -1082,94 +1036,6 @@ ], "time": "2019-11-02T09:15:47+00:00" }, - { - "name": "jakub-onderka/php-console-color", - "version": "v0.2", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "1.0", - "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "~4.3", - "squizlabs/php_codesniffer": "1.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleColor\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com" - } - ], - "time": "2018-09-29T17:23:10+00:00" - }, - { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.4", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "jakub-onderka/php-console-color": "~0.2", - "php": ">=5.4.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~1.0", - "jakub-onderka/php-var-dump-check": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleHighlighter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" - } - ], - "description": "Highlight PHP code in terminal", - "time": "2018-09-29T18:48:56+00:00" - }, { "name": "knplabs/knp-snappy", "version": "v1.2.0", @@ -1655,69 +1521,6 @@ ], "time": "2019-11-26T17:39:15+00:00" }, - { - "name": "laravel/tinker", - "version": "v1.0.10", - "source": { - "type": "git", - "url": "https://github.com/laravel/tinker.git", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/ad571aacbac1539c30d480908f9d0c9614eaf1a7", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7", - "shasum": "" - }, - "require": { - "illuminate/console": "~5.1|^6.0", - "illuminate/contracts": "~5.1|^6.0", - "illuminate/support": "~5.1|^6.0", - "php": ">=5.5.9", - "psy/psysh": "0.7.*|0.8.*|0.9.*", - "symfony/var-dumper": "~3.0|~4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "suggest": { - "illuminate/database": "The Illuminate Database package (~5.1)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Tinker\\TinkerServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Tinker\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Powerful REPL for the Laravel framework.", - "keywords": [ - "REPL", - "Tinker", - "laravel", - "psysh" - ], - "time": "2019-08-07T15:10:45+00:00" - }, { "name": "laravie/html", "version": "v6.0.1", @@ -2297,67 +2100,6 @@ ], "time": "2020-01-14T10:43:40+00:00" }, - { - "name": "maximebf/debugbar", - "version": "v1.15.1", - "source": { - "type": "git", - "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6c4277f6117e4864966c9cb58fb835cee8c74a1e", - "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "psr/log": "^1.0", - "symfony/var-dumper": "^2.6|^3|^4" - }, - "require-dev": { - "phpunit/phpunit": "^5" - }, - "suggest": { - "kriswallsmith/assetic": "The best way to manage assets", - "monolog/monolog": "Log using Monolog", - "predis/predis": "Redis storage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.15-dev" - } - }, - "autoload": { - "psr-4": { - "DebugBar\\": "src/DebugBar/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Bouroumeau-Fuseau", - "email": "maxime.bouroumeau@gmail.com", - "homepage": "http://maximebf.com" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Debug bar in the browser for php application", - "homepage": "https://github.com/maximebf/php-debugbar", - "keywords": [ - "debug", - "debugbar" - ], - "time": "2019-09-24T14:55:42+00:00" - }, { "name": "monolog/monolog", "version": "2.0.2", @@ -2509,58 +2251,6 @@ ], "time": "2019-12-16T16:30:25+00:00" }, - { - "name": "nikic/php-parser", - "version": "v4.3.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "0.0.5", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2019-11-08T13:50:10+00:00" - }, { "name": "opis/closure", "version": "3.5.1", @@ -3218,80 +2908,6 @@ ], "time": "2017-10-23T01:57:42+00:00" }, - { - "name": "psy/psysh", - "version": "v0.9.12", - "source": { - "type": "git", - "url": "https://github.com/bobthecow/psysh.git", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4", - "shasum": "" - }, - "require": { - "dnoegel/php-xdg-base-dir": "0.1.*", - "ext-json": "*", - "ext-tokenizer": "*", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", - "php": ">=5.4.0", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "~2.15|~3.16", - "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" - }, - "suggest": { - "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", - "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." - }, - "bin": [ - "bin/psysh" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "0.9.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Psy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Justin Hileman", - "email": "justin@justinhileman.info", - "homepage": "http://justinhileman.com" - } - ], - "description": "An interactive shell for modern PHP.", - "homepage": "http://psysh.org", - "keywords": [ - "REPL", - "console", - "interactive", - "shell" - ], - "time": "2019-12-06T14:19:43+00:00" - }, { "name": "quickbooks/v3-php-sdk", "version": "dev-master", @@ -5191,6 +4807,107 @@ } ], "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.2.8", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "18208d64897ab732f6c04a19b319fe8f1d57a9c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/18208d64897ab732f6c04a19b319fe8f1d57a9c0", + "reference": "18208d64897ab732f6c04a19b319fe8f1d57a9c0", + "shasum": "" + }, + "require": { + "illuminate/routing": "^5.5|^6", + "illuminate/session": "^5.5|^6", + "illuminate/support": "^5.5|^6", + "maximebf/debugbar": "~1.15.0", + "php": ">=7.0", + "symfony/debug": "^3|^4", + "symfony/finder": "^3|^4" + }, + "require-dev": { + "laravel/framework": "5.5.x" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "time": "2019-08-29T07:01:03+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2019-12-04T15:06:13+00:00" + }, { "name": "doctrine/instantiator", "version": "1.3.0", @@ -5575,6 +5292,218 @@ ], "time": "2016-01-20T08:20:44+00:00" }, + { + "name": "jakub-onderka/php-console-color", + "version": "v0.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "1.0", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "~4.3", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleColor\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" + } + ], + "time": "2018-09-29T17:23:10+00:00" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.4", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "jakub-onderka/php-console-color": "~0.2", + "php": ">=5.4.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~1.0", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleHighlighter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "description": "Highlight PHP code in terminal", + "time": "2018-09-29T18:48:56+00:00" + }, + { + "name": "laravel/tinker", + "version": "v1.0.10", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/ad571aacbac1539c30d480908f9d0c9614eaf1a7", + "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7", + "shasum": "" + }, + "require": { + "illuminate/console": "~5.1|^6.0", + "illuminate/contracts": "~5.1|^6.0", + "illuminate/support": "~5.1|^6.0", + "php": ">=5.5.9", + "psy/psysh": "0.7.*|0.8.*|0.9.*", + "symfony/var-dumper": "~3.0|~4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (~5.1)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "time": "2019-08-07T15:10:45+00:00" + }, + { + "name": "maximebf/debugbar", + "version": "v1.15.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^5" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2019-09-24T14:55:42+00:00" + }, { "name": "mockery/mockery", "version": "1.3.1", @@ -5688,6 +5617,58 @@ ], "time": "2019-12-15T19:12:40+00:00" }, + { + "name": "nikic/php-parser", + "version": "v4.3.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "0.0.5", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2019-11-08T13:50:10+00:00" + }, { "name": "nunomaduro/collision", "version": "v3.0.1", @@ -6403,6 +6384,80 @@ ], "time": "2020-01-08T08:49:49+00:00" }, + { + "name": "psy/psysh", + "version": "v0.9.12", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "90da7f37568aee36b116a030c5f99c915267edd4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", + "reference": "90da7f37568aee36b116a030c5f99c915267edd4", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1.*", + "ext-json": "*", + "ext-tokenizer": "*", + "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", + "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", + "php": ">=5.4.0", + "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0", + "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "hoa/console": "~2.15|~3.16", + "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", + "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.9.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2019-12-06T14:19:43+00:00" + }, { "name": "scrivo/highlight.php", "version": "v9.17.1.0", diff --git a/config/mail-auto-embed.php b/config/mail-auto-embed.php new file mode 100644 index 0000000..eabff92 --- /dev/null +++ b/config/mail-auto-embed.php @@ -0,0 +1,28 @@ + env('MAIL_AUTO_EMBED', true), + + /* + |-------------------------------------------------------------------------- + | Mail embed method + |-------------------------------------------------------------------------- + | + | Supported: "attachment", "base64" + | + */ + + 'method' => env('MAIL_AUTO_EMBED_METHOD', 'attachment'), + +]; diff --git a/config/mail.php b/config/mail.php index 38bf2b3..0aa5ea1 100644 --- a/config/mail.php +++ b/config/mail.php @@ -132,5 +132,6 @@ return [ */ 'log_channel' => env('MAIL_LOG_CHANNEL'), + 'local_domain' => env('MAIL_HOST'), ]; diff --git a/resources/views/email/system/social_link.blade.php b/resources/views/email/system/social_link.blade.php index d45c57a..58f482a 100644 --- a/resources/views/email/system/social_link.blade.php +++ b/resources/views/email/system/social_link.blade.php @@ -1,10 +1,8 @@ -@component('mail::message',['site'=>$site]) -Howdy, +@component('mail::message',['site'=>$site,'heading'=>'Link Your Account']) +Hi {{ isset($user) ? $user->name.',' : '' }} A request was made to link your account to a social login. - If you didnt make this request, you can ignore this, and the request will be ignored. - If you did make the request, then please enter the code displayed below. @component('mail::panel') @@ -13,6 +11,11 @@ If you did make the request, then please enter the code displayed below. Once you've keyed in this code, you'll be able to login to your account using your social login instead of a username and a password. -Thanks,
-{{ config('app.name') }} +Thanks, + +{{ config('mail.from.name') }} + +@component('mail::subcopy') +If you didnt make this request, you can safely ignore this email - no change was made to your account, nor was it accessed by an unauthorised person. +@endcomponent @endcomponent \ No newline at end of file diff --git a/resources/views/email/system/test_email.blade.php b/resources/views/email/system/test_email.blade.php new file mode 100644 index 0000000..1f6c100 --- /dev/null +++ b/resources/views/email/system/test_email.blade.php @@ -0,0 +1,11 @@ +@component('mail::message',['site'=>$site,'heading'=>'System Test Email']) +Hi {{ isset($user) ? $user->name.',' : '' }} + +This is just a test email to validate that you can receive emails from us. + +Nothing you need to do! + +Thanks, + +{{ config('mail.from.name') }} +@endcomponent \ No newline at end of file diff --git a/resources/views/vendor/mail/html/footer.blade.php b/resources/views/vendor/mail/html/footer.blade.php new file mode 100644 index 0000000..4426bce --- /dev/null +++ b/resources/views/vendor/mail/html/footer.blade.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/resources/views/vendor/mail/html/header.blade.php b/resources/views/vendor/mail/html/header.blade.php index 1e8c69e..6ab99c0 100644 --- a/resources/views/vendor/mail/html/header.blade.php +++ b/resources/views/vendor/mail/html/header.blade.php @@ -1,7 +1,6 @@ - - - -
{{ $slot }}
-
- - \ No newline at end of file +
+
+
+
{{ $slot }}
+
+
\ No newline at end of file diff --git a/resources/views/vendor/mail/html/layout.blade.php b/resources/views/vendor/mail/html/layout.blade.php index 14dec0e..144dbdd 100644 --- a/resources/views/vendor/mail/html/layout.blade.php +++ b/resources/views/vendor/mail/html/layout.blade.php @@ -3,54 +3,23 @@ + + + + + - + {{ $subcopy ?? '' }} + - - - - - - -
  - - {{ $header ?? '' }} - - - - - - - {{ $footer ?? '' }} -
- - - - - -
- {{ Illuminate\Mail\Markdown::parse($slot) }} - - {{ $subcopy ?? '' }} -
-
-
 
+ {{ $footer ?? '' }} - + \ No newline at end of file diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index 2a39d34..78bb11e 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -1,8 +1,8 @@ @component('mail::layout') {{-- Header --}} @slot('header') - @component('mail::header', ['url' => config('app.url'),'logo'=>url($site->site_logo)]) - {{ $site->site_name }} + @component('mail::header', ['url' => config('app.url'),'logo'=>url($site->email_logo)]) + {{ $heading }} @endcomponent @endslot @@ -21,7 +21,11 @@ {{-- Footer --}} @slot('footer') @component('mail::footer') - © {{ date('Y') }} {{ config('app.name') }}. All rights reserved. +
+ {{ config('mail.from.name') }}
+ {!! $site->address('html') !!}
+ {{ $site->site_email }} +
@endcomponent @endslot @endcomponent \ No newline at end of file diff --git a/resources/views/vendor/mail/html/panel.blade.php b/resources/views/vendor/mail/html/panel.blade.php new file mode 100644 index 0000000..6375910 --- /dev/null +++ b/resources/views/vendor/mail/html/panel.blade.php @@ -0,0 +1,5 @@ +
+
+ {{ $slot }} +
+
\ No newline at end of file diff --git a/resources/views/vendor/mail/html/subcopy.blade.php b/resources/views/vendor/mail/html/subcopy.blade.php new file mode 100644 index 0000000..3afafd8 --- /dev/null +++ b/resources/views/vendor/mail/html/subcopy.blade.php @@ -0,0 +1,3 @@ +
+ {{ Illuminate\Mail\Markdown::parse($slot) }} +
\ No newline at end of file diff --git a/resources/views/vendor/mail/html/themes/default.css b/resources/views/vendor/mail/html/themes/default.css index 09ba6e1..0fe0fcb 100644 --- a/resources/views/vendor/mail/html/themes/default.css +++ b/resources/views/vendor/mail/html/themes/default.css @@ -1,299 +1,123 @@ -/* 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; -} - -.header img { - height: 35px; -} - -/* Body */ - -.body { - background-color: #FFFFFF; - border-bottom: 1px solid #EDEFF2; - border-top: 1px solid #EDEFF2; - margin: 0; - padding: 0; - width: 580px; - -premailer-cellpadding: 0; - -premailer-cellspacing: 0; - -premailer-width: 100%; -} - -.inner-body { - background-color: #FFFFFF; +body{ margin: 0 auto; - padding: 0; - width: 570px; - -premailer-cellpadding: 0; - -premailer-cellspacing: 0; - -premailer-width: 570px; + font-family: 'Bree Serif'; + background: #f4f4f4; + color: #6c7584; + font-size: 1.2em; } - -.pull-right { - float: right; +.header{ + background: #232323; + border-bottom: 5px solid #454d59; + padding: 20px 0px 10px 0px; + margin-bottom: 30px; + color: #f4f4f4; + font-weight: 300; } - -.pull-left { - float: left; +.footer{ + background: #232323; + border-top: 5px solid #454d59; + padding: 10px 0px 20px 0px; + margin-top: 30px; + color: #f4f4f4; + font-weight: 100; } - -/* Subcopy */ - -.subcopy { - border-top: 1px solid #EDEFF2; - margin-top: 25px; - padding-top: 25px; +.subject{ + font-weight: 300; + font-family: 'Bree Serif',serif; + font-size: 1.5em; + /* text-align: right; */ } - -.subcopy p { - font-size: 12px; +.panel{ + background:#454d59; + border-radius: 10px; + padding: 20px; + font-weight: 300; + color: #f4f4f4; + font-size: 1.4em; + display: inline-block } - -/* Footer */ - -.footer { - margin: 0 auto; - padding: 0; - text-align: center; - width: 570px; - -premailer-cellpadding: 0; - -premailer-cellspacing: 0; - -premailer-width: 570px; +.light-box{ + background: #f9f9f9; + border-radius: 10px; + padding: 10px; + font-weight: 300; + margin-top: 20px; + font-size: 0.8em; } - -.footer p { - color: #AEAEAE; - font-size: 12px; - text-align: center; +.main-body{ + background: #ffffff; + border-radius: 10px; + color:#6c7584; + font-weight: 400; + padding:10px 20px; + border-top:1px solid #dbdbdb; + border-left:1px solid #dbdbdb; + border-right:1px solid #dbdbdb; + border-bottom:3px solid #dbdbdb; } +.main-body table thead td{ + font-weight: 300; + border-bottom: 1px solid #dbdbdb; + color: #ccc +} +.main-body table td.title{ + font-size: 1.1em; + line-height: 20px; +} +.main-body table td.title small{ + font-weight: 300; + font-size: 0.9em; + color: #6c7584 +} +.main-body .note{ + font-size: 0.8em; + font-weight: 300; + font-style: normal; +} +/* -- TO VALIDATE -- */ +a{ + text-decoration: underline; + color: #1cbbb4 +} +a:hover{text-decoration: none;} -/* Tables */ - -.table table { +h1{ + font-weight: 300; + color: #121212; + font-family: 'Bree Serif',serif; + margin:0 auto; + font-size: 32px; +} +h1 small{font-weight: 200; font-size: 24px;} +h3{ + font-weight: 300; + color: #121212; + font-family: 'Bree Serif',serif; + margin: 25px auto; + font-size: 24px; +} +.free{color:#1cbbb4;} +.paid{color:#0f80bb;} +.links{ margin: 30px auto; - width: 100%; - -premailer-cellpadding: 0; - -premailer-cellspacing: 0; - -premailer-width: 100%; + width: 600px; } - -.table th { - border-bottom: 1px solid #EDEFF2; - padding-bottom: 8px; - margin: 0; -} - -.table td { - color: #74787E; - font-size: 15px; - line-height: 18px; - padding: 10px 0; - margin: 0; -} - -.content-cell { - padding: 15px; -} - -/* 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; +.links table td{ + padding: 20px; text-align: center; + font-weight: 300; + color: #333; + font-size:18px; } +.links table td span, .links table td a{font-weight: 400} +.border-l{border-left:1px solid #ccc} +.apikey{font-size: 18px; color:#333} +.apikey p{border-bottom: 1px solid #dbdbdb; padding: 10px 0 10px 0;margin: 0 0;} +.apikey p.last{border-bottom: none} +.apikey small{font-size: 80%; font-weight: 300} +.twitter{padding: 20px; font-weight: 300;font-size:16px;} +.fixedw{width: 80%; margin: 0 auto;} +.right{float:right} +.left{float:left} +.clear{clear: both;} +table thead td {font-size: 16px;} \ No newline at end of file