Commit 46e2a861 authored by Sylvain's avatar Sylvain

Command test email

parent df0fb47b
<?php
namespace Goldenscarab\Modulus\App\Console\Modulus;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Mail;
class EmailTest extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'modulus:email-test {email}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Test de la configuration mail de l\'application';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->line("Envoi d'un email test...");
$this->line(vsprintf('Expéditeur: %s <%s>', [config('mail.from.name'), config('mail.from.address')]));
$this->line(sprintf('Destinataire: %s', $this->argument('email')));
Mail::raw('Félicitation ! La configuration mail est bien opérationnelle', function($msg) {
$msg->to($this->argument('email'))->subject('Modulus Test Email');
});
$this->info('✔ Email envoyé avec succès');
}
}
......@@ -2,6 +2,7 @@
namespace Goldenscarab\Modulus\App\Providers;
use Goldenscarab\Modulus\App\Console\Modulus\EmailTest;
use Illuminate\Support\ServiceProvider;
......@@ -15,6 +16,12 @@ class LoadServiceProvider extends ServiceProvider
*/
public function boot()
{
if ($this->app->runningInConsole()) {
$this->commands([
EmailTest::class,
]);
}
//$this->loadMigrationsFrom(__DIR__.'/../../database/migrations');
$this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'modulus');
$this->loadViewsFrom(__DIR__.'/../../resources/views', 'modulus');
......
Helpers @ 9c1f3baa
Subproject commit 0516ed513a46207ec8d91a923f9743051da16a1d
Subproject commit 9c1f3baaa7fa03aa84859e9c9eea782a76eb7dcc
......@@ -8,7 +8,7 @@
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name') }} - {{ strip_tags($title ?? '') }}</title>
<title>{{ config('app.name') }} - {{ strip_tags($title ?? $title_seo ?? '') }}</title>
<!-- Theme style -->
<link rel="stylesheet" href="{{ mix('css/app.css') }}">
......
{{-- Content Header --}}
@if (isset($title) || isset($subtitle))
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
......@@ -13,7 +14,7 @@
</h1>
@endisset
</div>
{{-- Fil d'ariane --}}
{{-- Fil d ariane --}}
@isset ($breadcrumb)
<div class="col">
<ol class="breadcrumb float-sm-right">
......@@ -35,7 +36,7 @@
</div>
</div>
</div>
@endif
{{-- Content simple--}}
<div class="content">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment