public function getLidddst(Request $request) { $table = Promotion::select('image', 'title', 'description', 'begin_date', 'end_date', 'id'); $datatable = Datatables::of($table)->editColumn('image', '<img src="{{$image}}" heigth=64" width="64" />')->editColumn('begin_date', '{{ date("d/m/Y H:i:s", strtotime($begin_date)) }}')->editColumn('end_date', '{{ date("d/m/Y H:i:s", strtotime($end_date)) }}')->addColumn('action', function ($table) { return '<a href="/admpanel/' . self::NAMEC . '/form/' . $table->id . '" class="btn btn-warning">Editar</a> <a href="#" data-url="/admpanel/' . self::NAMEC . '/delete/' . $table->id . '" class="btn btn-danger action_delete" data-id="' . $table->id . '" >Eliminar</a>'; }); return $datatable->make(true); }