Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120836099
PaymentSuccess.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
PaymentSuccess.php
View Options
<?php
namespace
App\Mail
;
use
App\Payment
;
use
App\Tenant
;
use
App\User
;
use
App\Utils
;
use
Illuminate\Bus\Queueable
;
use
Illuminate\Mail\Mailable
;
use
Illuminate\Queue\SerializesModels
;
class
PaymentSuccess
extends
Mailable
{
use
Queueable
;
use
SerializesModels
;
/** @var \App\Payment A payment operation */
protected
$payment
;
/** @var \App\User A wallet controller to whom the email is being send */
protected
$user
;
/**
* Create a new message instance.
*
* @param \App\Payment $payment A payment operation
* @param \App\User $user An email recipient
*
* @return void
*/
public
function
__construct
(
Payment
$payment
,
User
$user
)
{
$this
->
payment
=
$payment
;
$this
->
user
=
$user
;
}
/**
* Build the message.
*
* @return $this
*/
public
function
build
()
{
$appName
=
Tenant
::
getConfig
(
$this
->
user
->
tenant_id
,
'app.name'
);
$supportUrl
=
Tenant
::
getConfig
(
$this
->
user
->
tenant_id
,
'app.support_url'
);
$subject
=
\trans
(
'mail.paymentsuccess-subject'
,
[
'site'
=>
$appName
]);
$this
->
view
(
'emails.html.payment_success'
)
->
text
(
'emails.plain.payment_success'
)
->
subject
(
$subject
)
->
with
([
'site'
=>
$appName
,
'subject'
=>
$subject
,
'username'
=>
$this
->
user
->
name
(
true
),
'walletUrl'
=>
Utils
::
serviceUrl
(
'/wallet'
,
$this
->
user
->
tenant_id
),
'supportUrl'
=>
$supportUrl
,
]);
return
$this
;
}
/**
* Render the mail template with fake data
*
* @param string $type Output format ('html' or 'text')
*
* @return string HTML or Plain Text output
*/
public
static
function
fakeRender
(
string
$type
=
'html'
):
string
{
$payment
=
new
Payment
();
$user
=
new
User
([
'email'
=>
'test@'
.
\config
(
'app.domain'
),
]);
$mail
=
new
self
(
$payment
,
$user
);
return
Helper
::
render
(
$mail
,
$type
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 1:26 PM (10 h, 14 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
46/61/10408fa4e070e9f4ad55e5bc5ff7
Default Alt Text
PaymentSuccess.php (2 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline