Current File : /home/tradevaly/www/app/Console/payment.php |
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\User;
class payment extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:payment';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
$user = User::where('id',auth()->id())->first();
$user->balance = $user->balance + 1;
$user->save();
}
}