/** * Update a role. * * @param array $inputs * @param int $id * @return void */ public function update($input, $id) { //dd($input['enabled']); $status = Status::find($id); $status->update($input); }
/** * Datatables data * * @return Datatables JSON */ public function data() { // $query = Status::select(array('statuses.id','statuses.name','statuses.description')) // ->orderBy('statuses.name', 'ASC'); // $query = Status::select('id', 'name' 'description', 'updated_at'); // ->orderBy('name', 'ASC'); $query = Status::select('id', 'name', 'description', 'updated_at'); //dd($query); return Datatables::of($query)->addColumn('actions', ' <a href="{{ URL::to(\'admin/statuses/\' . $id . \'/edit\' ) }}" class="btn btn-success btn-sm" > <span class="glyphicon glyphicon-pencil"></span> {{ trans("kotoba::button.edit") }} </a> ')->make(true); }