Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120823373
WalletSetBalance.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
913 B
Referenced Files
None
Subscribers
None
WalletSetBalance.php
View Options
<?php
namespace
App\Console\Commands
;
use
Illuminate\Console\Command
;
class
WalletSetBalance
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'wallet:set-balance {wallet} {balance}'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Set the balance of a wallet'
;
/**
* 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
;
}
$wallet
->
balance
=
(
int
)(
$this
->
argument
(
'balance'
));
$wallet
->
save
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 10:05 AM (5 d, 4 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
75/82/4704f196af854ce0332571d970a3
Default Alt Text
WalletSetBalance.php (913 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline