Optimise the setting of our configuration via Setup::class, optimise the calculation of our_addresses()

This commit is contained in:
2024-11-02 23:30:42 +11:00
parent 1b228a58c9
commit 3b7ce4b9ce
9 changed files with 72 additions and 66 deletions

View File

@@ -12,37 +12,37 @@ use App\Models\{Setup,User};
class TestEmail extends Mailable
{
use Queueable, SerializesModels;
use Queueable, SerializesModels;
/* User to send mail to */
public User $user;
/* Our setup object */
public Setup $setup;
/* User to send mail to */
public User $user;
/* Our setup object */
public Setup $setup;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(User $o)
{
$this->user = $o;
}
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(User $o)
{
$this->user = $o;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$this->setup = Setup::findOrFail(config('app.id'));
/**
* Build the message.
*
* @return $this
*/
public function build()
{
$this->setup = Setup::findOrFail(config('app.id'));
return $this
->markdown('mail.system.test_email')
->subject('Just a test...')
->with([
'url'=>'https://localhost',
return $this
->markdown('mail.system.test_email')
->subject('Just a test...')
->with([
'url'=>sprintf('https://%s',gethostname()),
]);
}
}
}
}