<?php

namespace App\Admin\Actions\backstage\User;

use App\Models\Order;
use App\Models\OrderPack;
use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;

class Insurance extends RowAction
{
    public $name = '保险单链接';

//    public function handle(Model $model)
//    {
//        // $model ...
//
//        return $this->response()->success('Success message.')->refresh();
//    }
    public function form(Model $model)
    {
//        dd($model);
//        $order_id = Order::where('patient_id',$model->id)->where('product_type','6')->value('id');
        $val = OrderPack::where('order_id',$model->id)->value('insurance_img_url');
        $this->image('name')->value($val);
    }

}