21 lines
531 B
PHP
21 lines
531 B
PHP
<?php
|
|
|
|
namespace App\Admin\Actions\Withdrawal;
|
|
|
|
use Encore\Admin\Actions\RowAction;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Success extends RowAction
|
|
{
|
|
public $name = '通过';
|
|
|
|
public function handle(Model $model)
|
|
{
|
|
if ($model['status'] == 0 && !($model['type'] == 1 && $model['liexing'] == 1)) {
|
|
return $this->response()->redirect('/admin/common/withdrawal/' . $model->id);
|
|
} else {
|
|
return $this->response()->error('不要给人家送钱')->refresh();
|
|
}
|
|
}
|
|
}
|