Completed
Pull Request — master (#91)
by Glenn
02:32
created
app/Http/Controllers/ProductsController.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use App\Customer;
6
-use Illuminate\Http\Request;
7
-
8 6
 use App\Http\Requests;
9 7
 
10 8
 class CustomersController extends Controller
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
     public function store(Requests\ProductValidator $input)
45 45
     {
46 46
         $this->validate($input, [
47
-          'name' => 'required',
48
-          'category' => 'required',
49
-         ]);
47
+            'name' => 'required',
48
+            'category' => 'required',
49
+            ]);
50 50
 
51 51
         $product       = new Products();
52 52
         $product->name = $input->name;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 
22 22
     public function index()
23 23
     {
24
-        $data['products'] = Products::with('category')->paginate(15);
25
-        $data['category'] = ProductsCategories::paginate(15)->sortBy("name");
24
+        $data[ 'products' ] = Products::with('category')->paginate(15);
25
+        $data[ 'category' ] = ProductsCategories::paginate(15)->sortBy("name");
26 26
 
27 27
         return view('products.index', $data);
28 28
     }
Please login to merge, or discard this patch.
app/Products.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @var array
24 24
      */
25
-    protected $fillable = ['name', 'category_id'];
25
+    protected $fillable = [ 'name', 'category_id' ];
26 26
 
27 27
 
28 28
     /**
Please login to merge, or discard this patch.