调整后台发货和动态记录表
This commit is contained in:
25
modules/Mall/Http/Controllers/Admin/Action/Goods/Up.php
Normal file
25
modules/Mall/Http/Controllers/Admin/Action/Goods/Up.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Mall\Http\Controllers\Admin\Action\Goods;
|
||||
|
||||
use Encore\Admin\Actions\RowAction;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Up extends RowAction
|
||||
{
|
||||
public $name = '上架';
|
||||
|
||||
public function handle(Model $model)
|
||||
{
|
||||
if ($model->up()) {
|
||||
return $this->response()->success('上架成功')->refresh();
|
||||
} else {
|
||||
return $this->response()->error('上架失败')->refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public function dialog()
|
||||
{
|
||||
$this->confirm('确定上架吗');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user