id;
        $uid = request()->uid;
        $resume = Resume::where(['id'=>$id])->first();
        $member = MemberInfo::where(['uid'=>$uid])->first();
        return $content
            ->header('职位匹配')
            ->description('列表')
            ->body(view('admin.jobs.find_jobs')->with(['grid'=>$this->grid(),'resume'=>$resume,'member'=>$member]));
    }
    /**
     * Show interface.
     *
     * @param mixed $id
     * @param Content $content
     * @return Content
     */
    public function show($id, Content $content)
    {
        return $content
            ->header('职位匹配')
            ->description('详细')
            ->body($this->detail($id));
    }
    /**
     * Edit interface.
     *
     * @param mixed $id
     * @param Content $content
     * @return Content
     */
    public function edit($id, Content $content)
    {
        return $content
            ->header('职位匹配')
            ->description('编辑')
            ->body($this->editForm($id)->edit($id));
    }
    /**
     * Create interface.
     *
     * @param Content $content
     * @return Content
     */
    public function create(Content $content)
    {
        return $content
            ->header('职位匹配')
            ->description('创建')
            ->body($this->createForm());
    }
    /**
     * Make a grid builder.
     *
     * @return Grid
     */
    protected function grid()
    {
        $grid = new Grid(new Jobs);
        $grid->id('ID');
        $grid->jobs_name('职位名称');
        $grid->company_name('公司名称');
        $grid->audit('审核状态')->display(function ($audit) {
            switch ($audit) {
                case 1:
                    $audit = '审核通过';
                    break;
                case 2:
                    $audit = '审核中';
                    break;
                case 3:
                    $audit = '审核未通过';
                    break;
                default:
                    $audit = '审核中';
                    break;
            }
            return $audit;
        });
        $grid->column('categoryScale.demand', '公司规模');
        $grid->column('categoryTrade.demand', '所属行业');
        $grid->column('categoryEducation.demand', '职位要求');
        $grid->column('categoryWage.demand', '薪资待遇');
        $grid->created_at('添加时间')->sortable();
        $grid->updated_at('更新时间')->sortable();
        $grid->disableCreateButton();
        $grid->disableExport();
        $grid->actions(function ($actions) {
            $actions->disableView();
            $actions->disableEdit();
        });
        $grid->tools(function ($tools) {
            $but = <<
    
EOT;
            $tools->append($but);
        });
        return $grid;
    }
    /**
     * Make a show builder.
     *
     * @param mixed $id
     * @return Show
     */
    protected function detail($id)
    {
        $show = new Show(Jobs::findOrFail($id));
        $show->id('ID');
        return $show;
    }
    /**
     * Make a form builder.
     *
     * @return Form
     */
    protected function editForm($id)
    {
        $form = new Form(new Jobs);
        return $form;
    }
    protected function createForm()
    {
        $form = new Form(new Jobs);
        return $form;
    }
    /**
     * Store a newly created resource in storage.
     *
     * @return mixed
     */
    public function store()
    {
        return $this->createForm()->store();
    }
    /**
     * Update the specified resource in storage.
     *
     * @param int $id
     *
     * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response
     */
    public function update($id)
    {
        return $this->editForm($id)->update($id);
    }
    protected function form()
    {
        $form = new Form(new Jobs);
        $form->display('ID');
        $form->display('添加时间');
        $form->display('更新时间');
        return $form;
    }
}