creato meiler di test

This commit is contained in:
Amministratore 2023-06-12 13:11:56 +02:00
parent 20f050044b
commit 2ed8ede5f0
4 changed files with 68 additions and 20 deletions

39
app/Mail/myTestEmail.php Normal file
View File

@ -0,0 +1,39 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class myTestEmail extends Mailable
{
use Queueable, SerializesModels;
public $email;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($email)
{
//
$this->email=$email;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$name='none';
return $this
->subject('Email di Test')
->markdown('mail.test',['name' => $name]);
}
}

40
composer.lock generated
View File

@ -8241,16 +8241,16 @@
}, },
{ {
"name": "fakerphp/faker", "name": "fakerphp/faker",
"version": "v1.22.0", "version": "v1.23.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/FakerPHP/Faker.git", "url": "https://github.com/FakerPHP/Faker.git",
"reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2" "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/f85772abd508bd04e20bb4b1bbe260a68d0066d2", "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01",
"reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2", "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -8303,9 +8303,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/FakerPHP/Faker/issues", "issues": "https://github.com/FakerPHP/Faker/issues",
"source": "https://github.com/FakerPHP/Faker/tree/v1.22.0" "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0"
}, },
"time": "2023-05-14T12:31:37+00:00" "time": "2023-06-12T08:44:38+00:00"
}, },
{ {
"name": "filp/whoops", "name": "filp/whoops",
@ -8496,22 +8496,22 @@
}, },
{ {
"name": "mockery/mockery", "name": "mockery/mockery",
"version": "1.6.0", "version": "1.6.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/mockery/mockery.git", "url": "https://github.com/mockery/mockery.git",
"reference": "bac1765cb52bbd3364a870e920cb69cd859ee302" "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mockery/mockery/zipball/bac1765cb52bbd3364a870e920cb69cd859ee302", "url": "https://api.github.com/repos/mockery/mockery/zipball/13a7fa2642c76c58fa2806ef7f565344c817a191",
"reference": "bac1765cb52bbd3364a870e920cb69cd859ee302", "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"hamcrest/hamcrest-php": "^2.0.1", "hamcrest/hamcrest-php": "^2.0.1",
"lib-pcre": ">=7.0", "lib-pcre": ">=7.0",
"php": "^7.3 || ^8.0" "php": "^7.4 || ^8.0"
}, },
"conflict": { "conflict": {
"phpunit/phpunit": "<8.0" "phpunit/phpunit": "<8.0"
@ -8524,7 +8524,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.4.x-dev" "dev-main": "1.6.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -8568,9 +8568,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/mockery/mockery/issues", "issues": "https://github.com/mockery/mockery/issues",
"source": "https://github.com/mockery/mockery/tree/1.6.0" "source": "https://github.com/mockery/mockery/tree/1.6.2"
}, },
"time": "2023-05-03T12:55:29+00:00" "time": "2023-06-07T09:07:52+00:00"
}, },
{ {
"name": "myclabs/deep-copy", "name": "myclabs/deep-copy",
@ -9149,16 +9149,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.6.8", "version": "9.6.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e" "reference": "a9aceaf20a682aeacf28d582654a1670d8826778"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778",
"reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e", "reference": "a9aceaf20a682aeacf28d582654a1670d8826778",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -9232,7 +9232,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9"
}, },
"funding": [ "funding": [
{ {
@ -9248,7 +9248,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-05-11T05:14:45+00:00" "time": "2023-06-11T06:13:56+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",

View File

@ -0,0 +1,4 @@
Ciao {{ Auth::user()->name ?? $name }},
Hai configurato correttamente la posta elettronica!
Ciao.

View File

@ -15,6 +15,7 @@ use App\Http\Controllers\AutoController;
use App\Http\Controllers\AnagraficaController; use App\Http\Controllers\AnagraficaController;
use App\Http\Controllers\Utenti; use App\Http\Controllers\Utenti;
use App\Http\Controllers\ProgettiController; use App\Http\Controllers\ProgettiController;
use App\Mail\myTestEmail;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -151,3 +152,7 @@ Route::group(['middleware'=>['permission:progetti']], function(){
Route::get('test/user_role',[CondominioController::class,'user_role']); Route::get('test/user_role',[CondominioController::class,'user_role']);
Route::get('test/userclass',[Utenti::class,'userClass']); Route::get('test/userclass',[Utenti::class,'userClass']);
Route::get('testmail',function(){
$name='Flavio';
Mail::to('git@lavorain.cloud')->send(new myTestEmail($name));
});