6
0
Fork 0
release
panliang 2022-05-18 17:39:08 +08:00
parent 31ca699f31
commit a78dc2c412
2 changed files with 4 additions and 9 deletions

View File

@ -220,7 +220,7 @@ class OrderController extends AdminController
{ {
return function (Row $row) use ($id) { return function (Row $row) use ($id) {
$row->column(5, function ($column) use ($id) { $row->column(5, function ($column) use ($id) {
$builder = OrderModel::with(['user', 'userCoupon', 'tags'])->withCount('afterSales'); $builder = OrderModel::with(['user', 'userCoupon', 'tags', 'store'])->withCount('afterSales');
$column->row(Show::make($id, $builder, function (Show $show) { $column->row(Show::make($id, $builder, function (Show $show) {
// $show->field('id'); // $show->field('id');
$show->row(function (Show\Row $show) { $show->row(function (Show\Row $show) {
@ -287,7 +287,8 @@ class OrderController extends AdminController
$show->row(function (Show\Row $show) use ($userCouponId) { $show->row(function (Show\Row $show) use ($userCouponId) {
$show->width(6)->field('sales_value'); $show->width(6)->field('sales_value');
$show->field('completed_at', '完成时间'); $show->field('completed_at', '完成时间');
$show->width(12)->field('note')->width(10, 1); $show->field('note');
$show->field('store.title', '店铺');
$show->width(12)->field('remark')->width(10, 1); $show->width(12)->field('remark')->width(10, 1);
}); });

View File

@ -39,13 +39,7 @@ class UserToken extends Command
public function handle() public function handle()
{ {
$user = User::findOrFail($this->argument('id')); $user = User::findOrFail($this->argument('id'));
$tokens = $user->tokens; $token = $user->createToken('command');
$token = '';
if ($tokens->count() > 0) {
$token = $tokens->first();
} else {
$token = $user->createToken('command');
}
$this->info($token->plainTextToken); $this->info($token->plainTextToken);
return 0; return 0;
} }