mirror of
https://github.com/devfake/flox.git
synced 2024-11-15 22:52:32 +01:00
23ecc26978
* move refresh in tab, add job for refresh, add new setting * check for setting in kernel * prepare frontend and database for reminders * prepare mail settings * add timezone config * add security-advisories package * set back APP_URL * send daily reminder * update headlines for daily reminder * fix postgres id sequence on import * some basic responsive behaviour * add weekly reminder * fix footer css * update readme * change loading logo
52 lines
1.2 KiB
PHP
52 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Services\Storage;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class DailyReminder extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
private $episodes;
|
|
private $movies;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @param $episodes
|
|
* @param $movies
|
|
*/
|
|
public function __construct($episodes, $movies)
|
|
{
|
|
$this->episodes = $episodes;
|
|
$this->movies = $movies;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @param Storage $storage
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function build(Storage $storage)
|
|
{
|
|
$lang = collect(json_decode($storage->parseLanguage()));
|
|
$headline = $lang['daily reminder'];
|
|
$date = date(config('app.DATE_FORMAT_PATTERN'));
|
|
|
|
return $this->view('mails.compiled.daily')->with([
|
|
'headline' => $headline,
|
|
'episodesHeadline' => $lang['episodes today'],
|
|
'moviesHeadline' => $lang['movies today'],
|
|
'episodes' => $this->episodes,
|
|
'movies' => $this->movies,
|
|
'date' => $date,
|
|
])->subject("$headline $date");
|
|
}
|
|
}
|