Passed
Push — master ( 46bb46...96f0ff )
by Matthijs
23:45 queued 17:36
created
app/Http/Controllers/Backend/ProductAmountSeriesController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,19 +23,19 @@  discard block
 block discarded – undo
23 23
         $product = ProductService::find($productId);
24 24
         if ($request->wantsJson()) {
25 25
             $query = ProductAmountSeriesService::getModel()->select(
26
-                ['id', 'series_start', 'series_value', 'active','series_max']
26
+                ['id', 'series_start', 'series_value', 'active', 'series_max']
27 27
             )->where('product_id', '=', $productId);
28 28
             
29 29
             $datatables = Datatables::of($query)
30 30
 
31
-            ->addColumn('active', function ($query) {
31
+            ->addColumn('active', function($query) {
32 32
                 if ($query->active) {
33 33
                     return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
34 34
                 }
35 35
                 
36 36
                 return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-remove icon-red"></span></a>';
37 37
             })
38
-            ->addColumn('action', function ($query) use ($productId) {
38
+            ->addColumn('action', function($query) use ($productId) {
39 39
                 $deleteLink = Form::deleteajax(url()->route('product.product-amount-series.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
40 40
                 $links = '<a href="'.url()->route('product.product-amount-series.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
41 41
                 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function store(Request $request, $productId)
53 53
     {
54
-        $result  = ProductAmountSeriesService::create($request->all(), $productId);
54
+        $result = ProductAmountSeriesService::create($request->all(), $productId);
55 55
         return ProductService::notificationRedirect(array('product.product-amount-series.index', $productId), $result, 'The product amount series is inserted.');
56 56
     }
57 57
 
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function update(Request $request, $productId, $id)
72 72
     {
73
-        $result  = ProductAmountSeriesService::updateById($request->all(), $productId, $id);
73
+        $result = ProductAmountSeriesService::updateById($request->all(), $productId, $id);
74 74
         return ProductService::notificationRedirect(array('product.product-amount-series.index', $productId), $result, 'The product amount series is updated.');
75 75
     }
76 76
 
77 77
     public function destroy($productId, $id)
78 78
     {
79
-        $result  = ProductAmountSeriesService::destroy($id);
79
+        $result = ProductAmountSeriesService::destroy($id);
80 80
 
81 81
         if ($result) {
82 82
             Notification::success('The product amount series is deleted.');
Please login to merge, or discard this patch.