2021-06-05 09:26:32 +00:00
< ? php
namespace App\Notifications ;
use App\Models\Configuration ;
use App\Models\User ;
use Illuminate\Bus\Queueable ;
2021-06-22 21:22:57 +00:00
use Illuminate\Contracts\Queue\ShouldQueue ;
2021-06-05 09:26:32 +00:00
use Illuminate\Notifications\Notification ;
2021-06-22 21:22:57 +00:00
class WelcomeMessage extends Notification implements ShouldQueue
2021-06-05 09:26:32 +00:00
{
use Queueable ;
/**
* @ var User
*/
private $user ;
/**
* Create a new notification instance .
*
* @ param User $user
*/
public function __construct ( User $user )
{
$this -> user = $user ;
}
/**
* Get the notification ' s delivery channels .
*
* @ param mixed $notifiable
* @ return array
*/
public function via ( $notifiable )
{
return [ 'database' ];
}
2021-10-26 12:13:42 +00:00
public function AdditionalLines ()
2021-10-13 21:21:53 +00:00
{
$AdditionalLine = " " ;
if ( Configuration :: getValueByKey ( 'CREDITS_REWARD_AFTER_VERIFY_EMAIL' ) != 0 ) {
2021-10-26 13:53:11 +00:00
$AdditionalLine .= " Verifying your E-Mail Address will grant you " . Configuration :: getValueByKey ( 'CREDITS_REWARD_AFTER_VERIFY_EMAIL' ) . " additional " . Configuration :: getValueByKey ( 'CREDITS_DISPLAY_NAME' ) . " <br /> " ;
2021-10-13 21:21:53 +00:00
}
if ( Configuration :: getValueByKey ( 'SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL' ) != 0 ) {
$AdditionalLine .= " Verifying your Mail will also increase your Server Limit by " . Configuration :: getValueByKey ( 'SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL' ) . " <br /> " ;
}
2021-10-13 21:29:42 +00:00
$AdditionalLine .= " <br /> " ;
2021-10-13 21:21:53 +00:00
if ( Configuration :: getValueByKey ( 'CREDITS_REWARD_AFTER_VERIFY_DISCORD' ) != 0 ) {
2021-10-26 13:53:11 +00:00
$AdditionalLine .= " You can also verify your discord account to get another " . Configuration :: getValueByKey ( 'CREDITS_REWARD_AFTER_VERIFY_DISCORD' ) . " " . Configuration :: getValueByKey ( 'CREDITS_DISPLAY_NAME' ) . " <br /> " ;
2021-10-13 21:21:53 +00:00
}
if ( Configuration :: getValueByKey ( 'SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD' ) != 0 ) {
$AdditionalLine .= " Verifying Discord will also increase your Server Limit by " . Configuration :: getValueByKey ( 'SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD' ) . " <br /> " ;
}
return $AdditionalLine ;
}
2021-10-26 12:13:42 +00:00
/**
* Get the array representation of the notification .
*
* @ param mixed $notifiable
* @ return array
*/
public function toArray ( $notifiable )
{
2021-06-05 09:26:32 +00:00
return [
'title' => " Getting started! " ,
'content' => "
< p > Hello < strong > { $this -> user -> name } </ strong > , Welcome to our dashboard !</ p >
< h5 > Verification </ h5 >
2021-10-26 13:53:11 +00:00
< p > Please remember that you can verify your E - Mail address and Link / Verify your Discord - Account </ p >
2021-10-13 21:26:18 +00:00
< p >
2021-11-03 12:46:53 +00:00
" .WelcomeMessage->AdditionalLines(). "
2021-10-13 21:21:53 +00:00
</ p >
2021-06-05 09:26:32 +00:00
< h5 > Information </ h5 >
2021-06-06 09:29:53 +00:00
< p > This dashboard can be used to create and delete servers .< br /> These servers can be used and managed on our pterodactyl panel .< br /> If you have any questions , please join our Discord server and #create-a-ticket.</p>
2021-06-05 09:26:32 +00:00
< p > We hope you can enjoy this hosting experience and if you have any suggestions please let us know !</ p >
< p > Regards , < br /> " . config('app.name', 'Laravel') . " </ p >
" ,
];
}
}