Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120825533
WalletGetDiscount.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1014 B
Referenced Files
None
Subscribers
None
WalletGetDiscount.php
View Options
<?php
namespace
App\Console\Commands
;
use
Illuminate\Console\Command
;
class
WalletGetDiscount
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'wallet:get-discount {wallet}'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Display the existing discount to a wallet, if any.'
;
/**
* Create a new command instance.
*
* @return void
*/
public
function
__construct
()
{
parent
::
__construct
();
}
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
$wallet
=
\App\Wallet
::
find
(
$this
->
argument
(
'wallet'
));
if
(!
$wallet
)
{
return
1
;
}
if
(!
$wallet
->
discount
)
{
$this
->
info
(
"No discount on this wallet."
);
return
0
;
}
$this
->
info
(
$wallet
->
discount
->
discount
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 10:40 AM (57 m, 56 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18769221
Default Alt Text
WalletGetDiscount.php (1014 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline