From 40ad4a22c74b481382cc6247d7510a75a3ed8338 Mon Sep 17 00:00:00 2001 From: pajri Date: Thu, 29 Dec 2022 11:38:55 +0700 Subject: [PATCH] forget password --- Modules/Internal/Emails/SendVerifyEmail.php | 2 +- .../Http/Controllers/Api/AuthController.php | 14 +- .../Internal/Listeners/SendVerifyEmail.php | 8 +- .../Notifications/NotifyVerifyEmail.php | 21 +- .../src/pages/auth/ForgetPassword.tsx | 61 ++++ frontend/dashboard/src/routes/index.tsx | 2 + .../forget-password/ForgetPasswordForm.tsx | 117 +++++++ .../sections/auth/forget-password/index.ts | 1 + .../auth/reset-password/ResetPasswordForm.tsx | 2 +- .../views/vendor/mail/html/button.blade.php | 19 ++ .../views/vendor/mail/html/footer.blade.php | 11 + .../views/vendor/mail/html/header.blade.php | 10 + .../views/vendor/mail/html/layout.blade.php | 60 ++++ .../views/vendor/mail/html/message.blade.php | 27 ++ .../views/vendor/mail/html/panel.blade.php | 14 + .../views/vendor/mail/html/subcopy.blade.php | 7 + .../views/vendor/mail/html/table.blade.php | 3 + .../views/vendor/mail/html/themes/default.css | 302 ++++++++++++++++++ .../views/vendor/mail/text/button.blade.php | 1 + .../views/vendor/mail/text/footer.blade.php | 1 + .../views/vendor/mail/text/header.blade.php | 1 + .../views/vendor/mail/text/layout.blade.php | 9 + .../views/vendor/mail/text/message.blade.php | 27 ++ .../views/vendor/mail/text/panel.blade.php | 1 + .../views/vendor/mail/text/subcopy.blade.php | 1 + .../views/vendor/mail/text/table.blade.php | 1 + resources/views/verify_email.blade.php | 13 + 27 files changed, 721 insertions(+), 15 deletions(-) create mode 100755 frontend/dashboard/src/pages/auth/ForgetPassword.tsx create mode 100755 frontend/dashboard/src/sections/auth/forget-password/ForgetPasswordForm.tsx create mode 100755 frontend/dashboard/src/sections/auth/forget-password/index.ts create mode 100644 resources/views/vendor/mail/html/button.blade.php create mode 100644 resources/views/vendor/mail/html/footer.blade.php create mode 100644 resources/views/vendor/mail/html/header.blade.php create mode 100644 resources/views/vendor/mail/html/layout.blade.php create mode 100644 resources/views/vendor/mail/html/message.blade.php create mode 100644 resources/views/vendor/mail/html/panel.blade.php create mode 100644 resources/views/vendor/mail/html/subcopy.blade.php create mode 100644 resources/views/vendor/mail/html/table.blade.php create mode 100644 resources/views/vendor/mail/html/themes/default.css create mode 100644 resources/views/vendor/mail/text/button.blade.php create mode 100644 resources/views/vendor/mail/text/footer.blade.php create mode 100644 resources/views/vendor/mail/text/header.blade.php create mode 100644 resources/views/vendor/mail/text/layout.blade.php create mode 100644 resources/views/vendor/mail/text/message.blade.php create mode 100644 resources/views/vendor/mail/text/panel.blade.php create mode 100644 resources/views/vendor/mail/text/subcopy.blade.php create mode 100644 resources/views/vendor/mail/text/table.blade.php create mode 100644 resources/views/verify_email.blade.php diff --git a/Modules/Internal/Emails/SendVerifyEmail.php b/Modules/Internal/Emails/SendVerifyEmail.php index 4dd6f5a8..98a32809 100644 --- a/Modules/Internal/Emails/SendVerifyEmail.php +++ b/Modules/Internal/Emails/SendVerifyEmail.php @@ -30,7 +30,7 @@ class SendVerifyEmail extends Mailable public function build() { $this->subject('Verify Email') - ->markdown('email_user'); + ->markdown('verify_email'); return $this; } diff --git a/Modules/Internal/Http/Controllers/Api/AuthController.php b/Modules/Internal/Http/Controllers/Api/AuthController.php index 709710dc..db546e10 100755 --- a/Modules/Internal/Http/Controllers/Api/AuthController.php +++ b/Modules/Internal/Http/Controllers/Api/AuthController.php @@ -4,6 +4,8 @@ namespace Modules\Internal\Http\Controllers\Api; use App\Http\Controllers\Controller; use App\Models\User; +use Crypt; +use Error; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; @@ -87,23 +89,25 @@ class AuthController extends Controller return response(['message' => 'User Tidak Ditemukan'], 404); } + Event(new ForgetPassword($user)); - Mail::to($user->email)->send(new SendVerifyEmail($user)); + // Mail::to($user->email)->send(new SendVerifyEmail($user)); return response()->json($user); } public function forgetPassword(Request $request) { - return $request->all(); $request->validate([ - 'email' => 'required|email', 'new_password' => 'required', 'confirm_new_password' => 'required' ]); + $token = Crypt::decryptString($request->token); + $email = explode('|', $token)[0]; + $user = User::query() - ->where('email', $request->email) + ->where('email', $email) ->first(); if (!$user) { @@ -113,7 +117,7 @@ class AuthController extends Controller if ($request["new_password"] != $request["confirm_new_password"]) { return response([ 'message' => "Password Tidak Sama" - ]); + ], 404); } $user->update([ diff --git a/Modules/Internal/Listeners/SendVerifyEmail.php b/Modules/Internal/Listeners/SendVerifyEmail.php index 01806eeb..ddbf782c 100644 --- a/Modules/Internal/Listeners/SendVerifyEmail.php +++ b/Modules/Internal/Listeners/SendVerifyEmail.php @@ -2,10 +2,12 @@ namespace Modules\Internal\Listeners; +use App\Models\User; use Modules\Internal\Events\ForgetPassword; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Support\Facades\Mail; +use Modules\Internal\Notifications\NotifyVerifyEmail; class SendVerifyEmail { @@ -27,7 +29,9 @@ class SendVerifyEmail */ public function handle(ForgetPassword $event) { - dd($event->data); - Mail::raw('Hello World!', function($msg) {$msg->to('myemail@gmail.com')->subject('Test Email'); }); + User::where('email', $event->data['email']) + ->each(function ($user) use ($event) { + $user->notify(new NotifyVerifyEmail($event->data)); + }); } } diff --git a/Modules/Internal/Notifications/NotifyVerifyEmail.php b/Modules/Internal/Notifications/NotifyVerifyEmail.php index 6d6f9c5d..b41ad364 100644 --- a/Modules/Internal/Notifications/NotifyVerifyEmail.php +++ b/Modules/Internal/Notifications/NotifyVerifyEmail.php @@ -2,6 +2,7 @@ namespace Modules\Internal\Notifications; +use Crypt; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; @@ -10,15 +11,15 @@ use Illuminate\Notifications\Messages\MailMessage; class NotifyVerifyEmail extends Notification { use Queueable; - + protected $data; /** * Create a new notification instance. * * @return void */ - public function __construct() + public function __construct($data) { - // + $this->data = $data; } /** @@ -40,10 +41,18 @@ class NotifyVerifyEmail extends Notification */ public function toMail($notifiable) { + + $token = Crypt::encryptString($this->data['email'] . '|' . now()); + + $url = env('INTERNAL_URL', 'https://aso.linksehat.com') . '/auth/forget-password?token=' . $token; + return (new MailMessage) - ->line('The introduction to the notification.') - ->action('Notification Action', 'https://laravel.com') - ->line('Thank you for using our application!'); + ->subject('Verify Email') + ->markdown('verify_email', ['url' => $url]); + // return (new MailMessage) + // ->line('The introduction to the notification.') + // ->action('Notification Action', 'https://laravel.com') + // ->line('Thank you for using our application!'); } /** diff --git a/frontend/dashboard/src/pages/auth/ForgetPassword.tsx b/frontend/dashboard/src/pages/auth/ForgetPassword.tsx new file mode 100755 index 00000000..3a7285c9 --- /dev/null +++ b/frontend/dashboard/src/pages/auth/ForgetPassword.tsx @@ -0,0 +1,61 @@ +import { Link as RouterLink } from 'react-router-dom'; +// @mui +import { styled } from '@mui/material/styles'; +import { Box, Button, Link, Container, Typography } from '@mui/material'; +// layouts +import LogoOnlyLayout from '../../layouts/LogoOnlyLayout'; +// routes +import { PATH_AUTH } from '../../routes/paths'; +// components +import Page from '../../components/Page'; +import Iconify from '../../components/Iconify'; +// sections +import { ForgetPasswordForm } from '../../sections/auth/forget-password'; +import { useSearchParams } from 'react-router-dom'; + +// ---------------------------------------------------------------------- + +const RootStyle = styled('div')(({ theme }) => ({ + display: 'flex', + height: '100%', + alignItems: 'center', + padding: theme.spacing(12, 0), +})); + +// ---------------------------------------------------------------------- + +export default function ForgetPassword() { + const [searchParams, setSearchParams] = useSearchParams(); + const token = searchParams.get('token'); + + return ( + + + + + + + + + + + Please enter your new password. + + + + + + + + + + ); +} diff --git a/frontend/dashboard/src/routes/index.tsx b/frontend/dashboard/src/routes/index.tsx index b5ccc843..bd77a22d 100755 --- a/frontend/dashboard/src/routes/index.tsx +++ b/frontend/dashboard/src/routes/index.tsx @@ -53,6 +53,7 @@ export default function Router() { // { path: 'login-unprotected', element: }, // { path: 'register-unprotected', element: }, { path: 'reset-password', element: }, + { path: 'forget-password', element: }, // { path: 'verify', element: }, ], }, @@ -269,6 +270,7 @@ export default function Router() { const Login = Loadable(lazy(() => import('../pages/auth/Login'))); const ResetPassword = Loadable(lazy(() => import('../pages/auth/ResetPassword'))); +const ForgetPassword = Loadable(lazy(() => import('../pages/auth/ForgetPassword'))); // Dashboard const Dashboard = Loadable(lazy(() => import('../pages/Dashboard'))); diff --git a/frontend/dashboard/src/sections/auth/forget-password/ForgetPasswordForm.tsx b/frontend/dashboard/src/sections/auth/forget-password/ForgetPasswordForm.tsx new file mode 100755 index 00000000..2b761f04 --- /dev/null +++ b/frontend/dashboard/src/sections/auth/forget-password/ForgetPasswordForm.tsx @@ -0,0 +1,117 @@ +import * as Yup from 'yup'; +// form +import { yupResolver } from '@hookform/resolvers/yup'; +import { useForm } from 'react-hook-form'; +import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { Link as RouterLink, useNavigate } from 'react-router-dom'; + +// @mui +import { Alert, IconButton, InputAdornment, Stack, Typography } from '@mui/material'; +import { LoadingButton } from '@mui/lab'; +// hooks +import useIsMountedRef from '../../../hooks/useIsMountedRef'; +// components +import { FormProvider, RHFTextField } from '../../../components/hook-form'; +import axios from '../../../utils/axios'; +import Iconify from '../../../components/Iconify'; + +// ---------------------------------------------------------------------- + +type FormValuesProps = { + email: string; + afterSubmit?: string; +}; + +type Props = { + token: string; +}; + +export default function ForgetPasswordForm({ token }: Props) { + const isMountedRef = useIsMountedRef(); + const navigate = useNavigate(); + + const [showPasswordNew, setShowPasswordNew] = useState(false); + const [showPasswordConfirmNew, setShowPasswordConfirmNew] = useState(false); + const ResetPasswordSchema = Yup.object().shape({}); + + const methods = useForm({ + resolver: yupResolver(ResetPasswordSchema), + // defaultValues: { email: 'demo@minimals.cc' }, + }); + + const { + handleSubmit, + setError, + formState: { errors, isSubmitting }, + } = methods; + + const onSubmit = async (data: FormValuesProps) => { + try { + await axios.post('/forget-password', { ...data, token }); + console.log(data); + + // await new Promise((resolve) => setTimeout(resolve, 500)); + await new Promise((resolve) => setTimeout(resolve, 500)); + + if (isMountedRef.current) { + navigate('/auth/login', { replace: true }); + } + } catch (error) { + console.log(error.response.data); + if (isMountedRef.current) { + setError('afterSubmit', { ...error, message: error.response.data.message }); + } + } + }; + + return ( + + + {!!errors.afterSubmit && {errors.afterSubmit.message}} + Kata Sandi Baru + + setShowPasswordNew(!showPasswordNew)} edge="end"> + + + + ), + }} + /> + Konfirmasi Kata Sandi + + setShowPasswordConfirmNew(!showPasswordConfirmNew)} + edge="end" + > + + + + ), + }} + /> + + + Reset Password + + + + ); +} diff --git a/frontend/dashboard/src/sections/auth/forget-password/index.ts b/frontend/dashboard/src/sections/auth/forget-password/index.ts new file mode 100755 index 00000000..d119c42b --- /dev/null +++ b/frontend/dashboard/src/sections/auth/forget-password/index.ts @@ -0,0 +1 @@ +export { default as ForgetPasswordForm } from './ForgetPasswordForm'; diff --git a/frontend/dashboard/src/sections/auth/reset-password/ResetPasswordForm.tsx b/frontend/dashboard/src/sections/auth/reset-password/ResetPasswordForm.tsx index b8ddc0df..552100d2 100755 --- a/frontend/dashboard/src/sections/auth/reset-password/ResetPasswordForm.tsx +++ b/frontend/dashboard/src/sections/auth/reset-password/ResetPasswordForm.tsx @@ -32,7 +32,7 @@ export default function ResetPasswordForm({ onSent, onGetEmail }: Props) { const methods = useForm({ resolver: yupResolver(ResetPasswordSchema), - defaultValues: { email: 'demo@minimals.cc' }, + // defaultValues: { email: 'demo@minimals.cc' }, }); const { diff --git a/resources/views/vendor/mail/html/button.blade.php b/resources/views/vendor/mail/html/button.blade.php new file mode 100644 index 00000000..e74fe55a --- /dev/null +++ b/resources/views/vendor/mail/html/button.blade.php @@ -0,0 +1,19 @@ + + + + + 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 00000000..3ff41f89 --- /dev/null +++ b/resources/views/vendor/mail/html/footer.blade.php @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/resources/views/vendor/mail/html/header.blade.php b/resources/views/vendor/mail/html/header.blade.php new file mode 100644 index 00000000..8ef58593 --- /dev/null +++ b/resources/views/vendor/mail/html/header.blade.php @@ -0,0 +1,10 @@ + + + + @if (trim($slot) === 'Laravel') + @else + {{ $slot }} + @endif + + + \ 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 new file mode 100644 index 00000000..83660d9c --- /dev/null +++ b/resources/views/vendor/mail/html/layout.blade.php @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + \ 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 new file mode 100644 index 00000000..823b672a --- /dev/null +++ b/resources/views/vendor/mail/html/message.blade.php @@ -0,0 +1,27 @@ +@component('mail::layout') +{{-- Header --}} +@slot('header') +@component('mail::header', ['url' => config('app.url')]) + +@endcomponent +@endslot + +{{-- Body --}} +{{ $slot }} + +{{-- Subcopy --}} +@isset($subcopy) +@slot('subcopy') +@component('mail::subcopy') +{{ $subcopy }} +@endcomponent +@endslot +@endisset + +{{-- Footer --}} +@slot('footer') +@component('mail::footer') +© {{ date('Y') }} PrimayaApp. @lang('All rights reserved.') +@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 00000000..2975a60a --- /dev/null +++ b/resources/views/vendor/mail/html/panel.blade.php @@ -0,0 +1,14 @@ + + + + + + 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 00000000..ee5125de --- /dev/null +++ b/resources/views/vendor/mail/html/subcopy.blade.php @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/resources/views/vendor/mail/html/table.blade.php b/resources/views/vendor/mail/html/table.blade.php new file mode 100644 index 00000000..a5f3348b --- /dev/null +++ b/resources/views/vendor/mail/html/table.blade.php @@ -0,0 +1,3 @@ +
+{{ Illuminate\Mail\Markdown::parse($slot) }} +
diff --git a/resources/views/vendor/mail/html/themes/default.css b/resources/views/vendor/mail/html/themes/default.css new file mode 100644 index 00000000..f017e3ae --- /dev/null +++ b/resources/views/vendor/mail/html/themes/default.css @@ -0,0 +1,302 @@ +/* Base */ +@font-face { + font-family: 'EuclidCircularBBold'; + src: url('../../../../../../public/fonts/bold/EuclidCircularBBold.eot'); + src: url('../../../../../../public/fonts/bold/EuclidCircularBBold.eot') format('embedded-opentype'), + url('../../../../../../public/fonts/bold/EuclidCircularBBold.woff2') format('woff2'), + url('../../../../../../public/fonts/bold/EuclidCircularBBold.woff') format('woff'), + url('../../../../../../public/fonts/bold/EuclidCircularBBold.ttf') format('truetype'), + url('../../../../../../public/fonts/bold/EuclidCircularBBold.svg#EuclidCircularBBold') format('svg'); +} +body, +body *:not(html):not(style):not(br):not(tr):not(code) { + 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 { + -webkit-text-size-adjust: none; + background-color: #ffffff; + color: #718096; + height: 100%; + line-height: 1.4; + margin: 0; + padding: 0; + width: 100% !important; +} + +p, +ul, +ol, +blockquote { + line-height: 1.4; + text-align: left; +} + +a { + color: #3869d4; +} + +a img { + border: none; +} + +/* Typography */ + +h1 { + color: #3d4852; + font-size: 18px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +h2 { + font-size: 16px; + font-weight: bold; + margin-top: 0; + text-align: left; + font-family: 'EuclidCircularBBold'; + color: #3869d4; +} + +h3 { + font-size: 14px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +p { + font-size: 16px; + line-height: 1.5em; + margin-top: 0; + text-align: left; +} + +p.sub { + font-size: 12px; +} + +/* img { + max-width: 100%; +} */ + +/* Layout */ + +.wrapper { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + background-color: #edf2f7; + margin: 0; + padding: 0; + width: 100%; +} + +.content { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 0; + padding: 0; + width: 100%; +} + +/* Header */ + +.header { + padding: 25px 0; + text-align: center; +} + +.header a { + color: #3d4852; + font-size: 19px; + font-weight: bold; + text-decoration: none; +} + +/* Logo */ + +.logo { + height: 75px; + max-height: 75px; + width: 75px; +} + +/* Body */ + +.body { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + background-color: #edf2f7; + border-bottom: 1px solid #edf2f7; + border-top: 1px solid #edf2f7; + margin: 0; + padding: 0; + width: 100%; +} + +.inner-body { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -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 { + border-top: 1px solid #e8e5ef; + margin-top: 25px; + padding-top: 25px; +} + +.subcopy p { + font-size: 14px; +} + +/* Footer */ + +.footer { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 570px; + margin: 0 auto; + padding: 0; + text-align: center; + width: 570px; +} + +.footer p { + color: #b0adc5; + font-size: 12px; + text-align: center; +} + +.footer a { + color: #b0adc5; + text-decoration: underline; +} + +/* Tables */ + +.table table { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 30px auto; + width: 100%; +} + +.table th { + border-bottom: 1px solid #edeff2; + margin: 0; + padding-bottom: 8px; +} + +.table td { + color: #74787e; + font-size: 15px; + line-height: 18px; + margin: 0; + padding: 10px 0; + margin-bottom: 50px; + text-align: left; +} + +.content-cell { + max-width: 100vw; + padding: 32px; +} + +/* Buttons */ + +.action { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 30px auto; + padding: 0; + text-align: center; + width: 100%; +} + +.button { + -webkit-text-size-adjust: none; + border-radius: 4px; + color: #fff; + display: inline-block; + overflow: hidden; + text-decoration: none; +} + +.button-blue, +.button-primary { + background-color: #2d3748; + border-bottom: 8px solid #2d3748; + border-left: 18px solid #2d3748; + border-right: 18px solid #2d3748; + border-top: 8px solid #2d3748; +} + +.button-green, +.button-success { + background-color: #48bb78; + border-bottom: 8px solid #48bb78; + border-left: 18px solid #48bb78; + border-right: 18px solid #48bb78; + border-top: 8px solid #48bb78; +} + +.button-red, +.button-error { + background-color: #e53e3e; + border-bottom: 8px solid #e53e3e; + border-left: 18px solid #e53e3e; + border-right: 18px solid #e53e3e; + border-top: 8px solid #e53e3e; +} + +/* Panels */ + +.panel { + border-left: #2d3748 solid 4px; + margin: 21px 0; +} + +.panel-content { + background-color: #edf2f7; + color: #718096; + padding: 16px; +} + +.panel-content p { + color: #718096; +} + +.panel-item { + padding: 0; +} + +.panel-item p:last-of-type { + margin-bottom: 0; + padding-bottom: 0; +} + +/* Utilities */ + +.break-all { + word-break: break-all; +} diff --git a/resources/views/vendor/mail/text/button.blade.php b/resources/views/vendor/mail/text/button.blade.php new file mode 100644 index 00000000..97444ebd --- /dev/null +++ b/resources/views/vendor/mail/text/button.blade.php @@ -0,0 +1 @@ +{{ $slot }}: {{ $url }} diff --git a/resources/views/vendor/mail/text/footer.blade.php b/resources/views/vendor/mail/text/footer.blade.php new file mode 100644 index 00000000..3338f620 --- /dev/null +++ b/resources/views/vendor/mail/text/footer.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/resources/views/vendor/mail/text/header.blade.php b/resources/views/vendor/mail/text/header.blade.php new file mode 100644 index 00000000..aaa3e575 --- /dev/null +++ b/resources/views/vendor/mail/text/header.blade.php @@ -0,0 +1 @@ +[{{ $slot }}]({{ $url }}) diff --git a/resources/views/vendor/mail/text/layout.blade.php b/resources/views/vendor/mail/text/layout.blade.php new file mode 100644 index 00000000..9378baa0 --- /dev/null +++ b/resources/views/vendor/mail/text/layout.blade.php @@ -0,0 +1,9 @@ +{!! strip_tags($header) !!} + +{!! strip_tags($slot) !!} +@isset($subcopy) + +{!! strip_tags($subcopy) !!} +@endisset + +{!! strip_tags($footer) !!} diff --git a/resources/views/vendor/mail/text/message.blade.php b/resources/views/vendor/mail/text/message.blade.php new file mode 100644 index 00000000..09b3b72a --- /dev/null +++ b/resources/views/vendor/mail/text/message.blade.php @@ -0,0 +1,27 @@ +@component('mail::layout') +{{-- Header --}} +@slot('header') +@component('mail::header', ['url' => config('app.url')]) + +@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') }}. @lang('All rights reserved.') +@endcomponent +@endslot +@endcomponent \ No newline at end of file diff --git a/resources/views/vendor/mail/text/panel.blade.php b/resources/views/vendor/mail/text/panel.blade.php new file mode 100644 index 00000000..3338f620 --- /dev/null +++ b/resources/views/vendor/mail/text/panel.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/resources/views/vendor/mail/text/subcopy.blade.php b/resources/views/vendor/mail/text/subcopy.blade.php new file mode 100644 index 00000000..3338f620 --- /dev/null +++ b/resources/views/vendor/mail/text/subcopy.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/resources/views/vendor/mail/text/table.blade.php b/resources/views/vendor/mail/text/table.blade.php new file mode 100644 index 00000000..3338f620 --- /dev/null +++ b/resources/views/vendor/mail/text/table.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/resources/views/verify_email.blade.php b/resources/views/verify_email.blade.php new file mode 100644 index 00000000..cbba520f --- /dev/null +++ b/resources/views/verify_email.blade.php @@ -0,0 +1,13 @@ +@component('mail::message') +# Verify Email + +Please click the button below to verify your email address. + +@component('mail::button', ['url' => $url]) +Verify Email +@endcomponent + +Thanks,
+{{ config('app.name') }} + +@endcomponent \ No newline at end of file