public function create_item($ac_id) { $conditions = TransCondition::lists('name', 'id'); $golongan = TransGol::lists('name', 'id'); $investors = TransInvestor::lists('name', 'id'); $units = TransUnit::lists('name', 'id'); return view('transaction_assets.create_item', compact('ac_id', 'conditions', 'golongan', 'investors', 'units')); }
public function trans_condition() { \DB::statement(\DB::raw('set @rownum=0')); $trans_conditions = TransCondition::select([\DB::raw('@rownum := @rownum + 1 AS rownum'), 'id', 'name']); return Datatables::of($trans_conditions)->addColumn('action', function ($trans_condition) { return ' <button id="btn-delete" class="btn btn-xs btn-danger" data-remote="./destroy/' . $trans_condition->id . '/' . 'condition' . '">Delete</button> '; })->make(true); }