public function anyData() { $oferte = PrimaPaginaOferte::with('categorie'); return Datatables::of($oferte)->editColumn('Activ', function ($oferte) { return $oferte->Activ != 0 ? $val = 'Da' : ($val = 'Nu'); })->addColumn('action', function ($oferte) { return '<a href="' . url('auth/primapaginaoferte', [$oferte->id, 'edit']) . '"><button type="submit" class="btn btn-primary btn-xs">Modifica</button></a> ' . \Form::open(['method' => 'DELETE', 'url' => ['auth/primapaginaoferte', $oferte->id], "style" => "display:inline"]) . '<button type="submit" class="btn btn-danger btn-xs" onclick="if(confirm(\'Sigur doriti sa stergeti?\')) return true; else return false; ">Sterge</button>' . \Form::close(); })->make(true); }