@@ -3,8 +3,6 @@ |
||
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 |
@@ -44,9 +44,9 @@ |
||
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; |
@@ -21,8 +21,8 @@ |
||
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 | } |
@@ -22,7 +22,7 @@ |
||
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 | /** |