dd/app/Services/Ship/ServiceShipHtml.php
hellcat 55198846ae 1
2026-07-27 14:41:20 +08:00

31 lines
780 B
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
namespace App\Services\Ship;
use App\Models\Ship;
final class ServiceShipHtml
{
public static function byShipCode($aShipCode)
{
$sJctj = "";
foreach ($aShipCode as $sShipCode) {
$oShip = Ship::where("code", $sShipCode)->first();
$sJctj .= "<h2>机场推荐 - {$oShip->name}</h2>\n\n";
$aShipGood = json_decode($oShip->good, true);
$sShipGood = implode("\n\n", $aShipGood);
$sJctj .= $sShipGood;
$sJctj .= "\n\n";
$sJctj .= "<b><a target='__blank' style='color:blue;' href='https://{$oShip->www}'>👉 点击进入机场官网:{$oShip->name}。</a></b>";
}
return $sJctj;
}
}