You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.4 KiB
78 lines
1.4 KiB
<?php
|
|
|
|
namespace App\Admin\Actions\Show;
|
|
|
|
use Dcat\Admin\Actions\Response;
|
|
use Dcat\Admin\Show\AbstractTool;
|
|
use Dcat\Admin\Traits\HasPermissions;
|
|
use Illuminate\Contracts\Auth\Authenticatable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Http\Request;
|
|
|
|
class OrderDetail extends AbstractTool
|
|
{
|
|
/**
|
|
* @return string
|
|
*/
|
|
protected $title = '订单订单详情';
|
|
|
|
/**
|
|
* Handle the action request.
|
|
*
|
|
* @param Request $request
|
|
*
|
|
* @return Response
|
|
*/
|
|
public function handle(Request $request)
|
|
{
|
|
dd($this->getKey());
|
|
|
|
return $this->response()
|
|
->success('Processed successfully.')
|
|
->redirect('/');
|
|
}
|
|
|
|
/**
|
|
* @return string|void
|
|
*/
|
|
protected function href()
|
|
{
|
|
return admin_url('auth/users');
|
|
}
|
|
|
|
/**
|
|
* @return string|array|void
|
|
*/
|
|
public function confirm()
|
|
{
|
|
return ['Confirm?', 'contents'];
|
|
}
|
|
|
|
/**
|
|
* @param Model|Authenticatable|HasPermissions|null $user
|
|
*
|
|
* @return bool
|
|
*/
|
|
protected function authorize($user): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// 如果你想自定义动作按钮的HTML,可以重写此方法
|
|
public function html()
|
|
{
|
|
|
|
return view('orderdetail');
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function parameters()
|
|
{
|
|
return [];
|
|
}
|
|
}
|