@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use App\Departments; |
6 | 6 | use Illuminate\Http\Request; |
7 | - |
|
8 | 7 | use App\Http\Requests; |
9 | 8 | |
10 | 9 | /** |
@@ -35,17 +35,17 @@ discard block |
||
35 | 35 | |
36 | 36 | public function edit_categories($id) |
37 | 37 | { |
38 | - $data['category'] = ProductsCategories::find($id); |
|
39 | - return view('products.edit_category', $data); |
|
38 | + $data['category'] = ProductsCategories::find($id); |
|
39 | + return view('products.edit_category', $data); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function remove_category($id) |
43 | 43 | { |
44 | - $category = ProductsCategories::find($id); |
|
45 | - $category->delete(); |
|
44 | + $category = ProductsCategories::find($id); |
|
45 | + $category->delete(); |
|
46 | 46 | |
47 | - session()->flash('message', trans('products.removed_category')); |
|
48 | - return redirect()->back(); |
|
47 | + session()->flash('message', trans('products.removed_category')); |
|
48 | + return redirect()->back(); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | public function store(Requests\ProductValidator $input) |
62 | 62 | { |
63 | 63 | $this->validate($input, [ |
64 | - 'name' => 'required', |
|
65 | - 'category' => 'required', |
|
66 | - ]); |
|
64 | + 'name' => 'required', |
|
65 | + 'category' => 'required', |
|
66 | + ]); |
|
67 | 67 | |
68 | 68 | $product = new Products(); |
69 | 69 | $product->name = $input->name; |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function saveCat(Request $input) |
87 | 87 | { |
88 | - $this->validate($input, [ |
|
88 | + $this->validate($input, [ |
|
89 | 89 | 'name' => 'required|unique:products_categories' |
90 | - ]); |
|
90 | + ]); |
|
91 | 91 | |
92 | 92 | $category = new ProductsCategories(); |
93 | 93 | $category->name = $input->name; |
@@ -100,10 +100,10 @@ discard block |
||
100 | 100 | |
101 | 101 | public function remove($id) |
102 | 102 | { |
103 | - $product = Products::find($id); |
|
104 | - $product->delete(); |
|
103 | + $product = Products::find($id); |
|
104 | + $product->delete(); |
|
105 | 105 | |
106 | - session()->flash('message', trans('products.removed')); |
|
107 | - return redirect()->back(); |
|
106 | + session()->flash('message', trans('products.removed')); |
|
107 | + return redirect()->back(); |
|
108 | 108 | } |
109 | 109 | } |
@@ -21,21 +21,21 @@ |
||
21 | 21 | |
22 | 22 | public function index() |
23 | 23 | { |
24 | - $data['products'] = Products::with('category')->paginate(10); |
|
25 | - $data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all(); |
|
24 | + $data[ 'products' ] = Products::with('category')->paginate(10); |
|
25 | + $data[ 'category' ] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all(); |
|
26 | 26 | |
27 | 27 | return view('products.index', $data); |
28 | 28 | } |
29 | 29 | |
30 | 30 | public function categories() |
31 | 31 | { |
32 | - $data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all(); |
|
32 | + $data[ 'category' ] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all(); |
|
33 | 33 | return view('products.categories', $data); |
34 | 34 | } |
35 | 35 | |
36 | 36 | public function edit_categories($id) |
37 | 37 | { |
38 | - $data['category'] = ProductsCategories::find($id); |
|
38 | + $data[ 'category' ] = ProductsCategories::find($id); |
|
39 | 39 | return view('products.edit_category', $data); |
40 | 40 | } |
41 | 41 |
@@ -6,10 +6,10 @@ |
||
6 | 6 | |
7 | 7 | class Segments extends Model |
8 | 8 | { |
9 | - /** |
|
10 | - * The database table used by the model. |
|
11 | - * |
|
12 | - * @var string |
|
13 | - */ |
|
14 | - protected $table = 'customers_segments'; |
|
9 | + /** |
|
10 | + * The database table used by the model. |
|
11 | + * |
|
12 | + * @var string |
|
13 | + */ |
|
14 | + protected $table = 'customers_segments'; |
|
15 | 15 | } |
@@ -8,27 +8,27 @@ |
||
8 | 8 | |
9 | 9 | class AssetsController extends Controller |
10 | 10 | { |
11 | - /** |
|
12 | - * AssetsController constructor. |
|
13 | - */ |
|
14 | - public function __construct() |
|
15 | - { |
|
16 | - $this->middleware('auth'); |
|
17 | - $this->middleware('lang'); |
|
18 | - } |
|
11 | + /** |
|
12 | + * AssetsController constructor. |
|
13 | + */ |
|
14 | + public function __construct() |
|
15 | + { |
|
16 | + $this->middleware('auth'); |
|
17 | + $this->middleware('lang'); |
|
18 | + } |
|
19 | 19 | |
20 | - public function index() |
|
21 | - { |
|
20 | + public function index() |
|
21 | + { |
|
22 | 22 | return view('assets.index'); |
23 | - } |
|
23 | + } |
|
24 | 24 | |
25 | - public function edit() |
|
26 | - { |
|
25 | + public function edit() |
|
26 | + { |
|
27 | 27 | return view('assets.edit'); |
28 | - } |
|
28 | + } |
|
29 | 29 | |
30 | - public function remove() |
|
31 | - { |
|
30 | + public function remove() |
|
31 | + { |
|
32 | 32 | |
33 | - } |
|
33 | + } |
|
34 | 34 | } |
@@ -8,29 +8,29 @@ |
||
8 | 8 | |
9 | 9 | class SegmentsController extends Controller |
10 | 10 | { |
11 | - public function __construct() |
|
12 | - { |
|
13 | - $this->middleware('auth'); |
|
14 | - $this->middleware('lang'); |
|
15 | - } |
|
16 | - |
|
17 | - public function index() |
|
18 | - { |
|
11 | + public function __construct() |
|
12 | + { |
|
13 | + $this->middleware('auth'); |
|
14 | + $this->middleware('lang'); |
|
15 | + } |
|
16 | + |
|
17 | + public function index() |
|
18 | + { |
|
19 | 19 | return view('segments.index'); |
20 | - } |
|
20 | + } |
|
21 | 21 | |
22 | - public function store() |
|
23 | - { |
|
22 | + public function store() |
|
23 | + { |
|
24 | 24 | return view('segments.register'); |
25 | - } |
|
25 | + } |
|
26 | 26 | |
27 | - public function edit() |
|
28 | - { |
|
27 | + public function edit() |
|
28 | + { |
|
29 | 29 | return view('segments.edit'); |
30 | - } |
|
30 | + } |
|
31 | 31 | |
32 | - public function update() |
|
33 | - { |
|
32 | + public function update() |
|
33 | + { |
|
34 | 34 | |
35 | - } |
|
35 | + } |
|
36 | 36 | } |