📜  laravel ajax 中的路由编辑按钮 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:46.883000             🧑  作者: Mango

代码示例1
public function getJobs()
    {
        return datatables()->of(Jobs::latest()->get())
            ->addColumn('action', function ($jobs) {
                $button = '
'; $button .= ' Edit'; $button .= ''; $button .= '
'; return $button; }) ->rawColumns(['action']) ->make(true); } public function destroy($id) { Jobs::find($id)->delete(); }