testpao controller
This commit is contained in:
@@ -99,7 +99,7 @@ class OrderUpdateGm extends Command
|
||||
if($orderupdated > 0) {
|
||||
// Send the email to the admin with the details of the order log
|
||||
Mail::raw($log, function ($message, $orderupdated) {
|
||||
$message->to("log@fioredellavita.it");
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("Ordini Aggiornati su GM:" . $orderupdated));
|
||||
|
||||
});
|
||||
|
||||
@@ -1048,7 +1048,7 @@ class ProductUpdateGm extends Command
|
||||
Log::channel('updateproducts')->notice($log . $log2 . $log1 . $log3);
|
||||
Log::channel('updateproducts')->notice('Fino a ' . $ora_update . "\n");
|
||||
Mail::raw($loginizio . $log . $log2 . $log1 . $log3 . $logfine, function ($message) {
|
||||
$message->to("log@fioredellavita.it");
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("Inserim. nuovi prodotti"));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ class ProductUpdateQta extends Command
|
||||
if ($aggiornato) {
|
||||
Log::channel('updateproductsqta')->notice($loginizio . $lognrprodotti . $logfine);
|
||||
Mail::raw($loginizio . $lognrprodotti . $logfine, function ($message) {
|
||||
$message->to("log@fioredellavita.it");
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("Aggiornam. Qtà Prodotti:"));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ class ProductUpdateUsedGm extends Command
|
||||
Log::channel('updateproductsused')->notice($log . $log2 . $log1 . $log3);
|
||||
Log::channel('updateproductsused')->notice('Fino a ' . $ora_update . "\n");
|
||||
Mail::raw($loginizio . $log . $log2 . $log1 . $log3 . $logfine, function ($message) {
|
||||
$message->to("log@fioredellavita.it");
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("Inserim. nuovi prodotti Usati"));
|
||||
});
|
||||
}
|
||||
|
||||
24
app/Http/Controllers/TestPaoController.php
Normal file
24
app/Http/Controllers/TestPaoController.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class TestPaoController extends Controller
|
||||
{
|
||||
public function runTestPao()
|
||||
{
|
||||
try {
|
||||
echo "run";
|
||||
Artisan::call('product:testpao', []);
|
||||
} catch (\Exception $e) {
|
||||
// Log or handle the exception here
|
||||
}
|
||||
}
|
||||
|
||||
public function provapao()
|
||||
{
|
||||
$this->runTestPao();
|
||||
echo "Test OK!";
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,14 @@ class Mylog extends Model
|
||||
{
|
||||
public static $subject = '*** PROD: ';
|
||||
|
||||
public static $email = 'log@fioredellavita.it';
|
||||
|
||||
public static function getSubjectEmail(string $subject) {
|
||||
return self::$subject . " " . $subject;
|
||||
}
|
||||
|
||||
public static function getEmail() {
|
||||
return self::$email;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6294,3 +6294,5 @@ Route::get('/ordineclientegm/{id}', function($id){
|
||||
$clients = Clientegm::where('CodClienteInternet', $id)->get();
|
||||
dd($clients);
|
||||
});
|
||||
|
||||
Route::get('/provapao', [TestPaoController::class, 'provapao']);
|
||||
|
||||
Reference in New Issue
Block a user