@@ -56,21 +56,21 @@ |
||
| 56 | 56 | $allCategories = $this->productCategory->select('id', 'category_name')->get(); |
| 57 | 57 | |
| 58 | 58 | return \DataTables::of($allCategories) |
| 59 | - ->addColumn('checkbox', function ($model) { |
|
| 60 | - return "<input type='checkbox' class='category_checkbox' |
|
| 59 | + ->addColumn('checkbox', function ($model) { |
|
| 60 | + return "<input type='checkbox' class='category_checkbox' |
|
| 61 | 61 | value=".$model->id.' name=select[] id=check>'; |
| 62 | - }) |
|
| 63 | - ->addColumn('category_name', function ($model) { |
|
| 64 | - return ucfirst($model->category_name); |
|
| 65 | - }) |
|
| 66 | - ->addColumn('action', function ($model) { |
|
| 67 | - return "<p><button data-toggle='modal' |
|
| 62 | + }) |
|
| 63 | + ->addColumn('category_name', function ($model) { |
|
| 64 | + return ucfirst($model->category_name); |
|
| 65 | + }) |
|
| 66 | + ->addColumn('action', function ($model) { |
|
| 67 | + return "<p><button data-toggle='modal' |
|
| 68 | 68 | data-id=".$model->id." data-name= '$model->category_name' |
| 69 | 69 | class='btn btn-sm btn-primary btn-xs editCat'><i class='fa fa-edit' |
| 70 | 70 | style='color:white;'> </i> Edit</button> </p>"; |
| 71 | - }) |
|
| 72 | - ->rawColumns(['checkbox', 'category_name', 'action']) |
|
| 73 | - ->make(true); |
|
| 71 | + }) |
|
| 72 | + ->rawColumns(['checkbox', 'category_name', 'action']) |
|
| 73 | + ->make(true); |
|
| 74 | 74 | } catch (\Exception $ex) { |
| 75 | 75 | return redirect()->back()->with('fails', $ex->getMessage()); |
| 76 | 76 | } |
@@ -56,14 +56,14 @@ |
||
| 56 | 56 | $allCategories = $this->productCategory->select('id', 'category_name')->get(); |
| 57 | 57 | |
| 58 | 58 | return \DataTables::of($allCategories) |
| 59 | - ->addColumn('checkbox', function ($model) { |
|
| 59 | + ->addColumn('checkbox', function($model) { |
|
| 60 | 60 | return "<input type='checkbox' class='category_checkbox' |
| 61 | 61 | value=".$model->id.' name=select[] id=check>'; |
| 62 | 62 | }) |
| 63 | - ->addColumn('category_name', function ($model) { |
|
| 63 | + ->addColumn('category_name', function($model) { |
|
| 64 | 64 | return ucfirst($model->category_name); |
| 65 | 65 | }) |
| 66 | - ->addColumn('action', function ($model) { |
|
| 66 | + ->addColumn('action', function($model) { |
|
| 67 | 67 | return "<p><button data-toggle='modal' |
| 68 | 68 | data-id=".$model->id." data-name= '$model->category_name' |
| 69 | 69 | class='btn btn-sm btn-primary btn-xs editCat'><i class='fa fa-edit' |
@@ -34,21 +34,21 @@ |
||
| 34 | 34 | $allTypes = $this->productType->select('id', 'name')->get(); |
| 35 | 35 | |
| 36 | 36 | return \DataTables::of($allTypes) |
| 37 | - ->addColumn('checkbox', function ($model) { |
|
| 38 | - return "<input type='checkbox' class='type_checkbox' |
|
| 37 | + ->addColumn('checkbox', function ($model) { |
|
| 38 | + return "<input type='checkbox' class='type_checkbox' |
|
| 39 | 39 | value=".$model->id.' name=select[] id=check>'; |
| 40 | - }) |
|
| 41 | - ->addColumn('type_name', function ($model) { |
|
| 42 | - return ucfirst($model->name); |
|
| 43 | - }) |
|
| 44 | - ->addColumn('action', function ($model) { |
|
| 45 | - return "<p><button data-toggle='modal' |
|
| 40 | + }) |
|
| 41 | + ->addColumn('type_name', function ($model) { |
|
| 42 | + return ucfirst($model->name); |
|
| 43 | + }) |
|
| 44 | + ->addColumn('action', function ($model) { |
|
| 45 | + return "<p><button data-toggle='modal' |
|
| 46 | 46 | data-id=".$model->id." data-name= '$model->name' |
| 47 | 47 | class='btn btn-sm btn-primary btn-xs editType'><i class='fa fa-edit' |
| 48 | 48 | style='color:white;'> </i> Edit</button> </p>"; |
| 49 | - }) |
|
| 50 | - ->rawColumns(['checkbox', 'type_name', 'action']) |
|
| 51 | - ->make(true); |
|
| 49 | + }) |
|
| 50 | + ->rawColumns(['checkbox', 'type_name', 'action']) |
|
| 51 | + ->make(true); |
|
| 52 | 52 | } catch (\Exception $ex) { |
| 53 | 53 | Bugsnag::notifyException($ex); |
| 54 | 54 | |
@@ -34,14 +34,14 @@ |
||
| 34 | 34 | $allTypes = $this->productType->select('id', 'name')->get(); |
| 35 | 35 | |
| 36 | 36 | return \DataTables::of($allTypes) |
| 37 | - ->addColumn('checkbox', function ($model) { |
|
| 37 | + ->addColumn('checkbox', function($model) { |
|
| 38 | 38 | return "<input type='checkbox' class='type_checkbox' |
| 39 | 39 | value=".$model->id.' name=select[] id=check>'; |
| 40 | 40 | }) |
| 41 | - ->addColumn('type_name', function ($model) { |
|
| 41 | + ->addColumn('type_name', function($model) { |
|
| 42 | 42 | return ucfirst($model->name); |
| 43 | 43 | }) |
| 44 | - ->addColumn('action', function ($model) { |
|
| 44 | + ->addColumn('action', function($model) { |
|
| 45 | 45 | return "<p><button data-toggle='modal' |
| 46 | 46 | data-id=".$model->id." data-name= '$model->name' |
| 47 | 47 | class='btn btn-sm btn-primary btn-xs editType'><i class='fa fa-edit' |