app/Http/Controllers/ProductsController.php 1 location
|
@@ 22-28 (lines=7) @@
|
| 19 |
|
$this->middleware('lang'); |
| 20 |
|
} |
| 21 |
|
|
| 22 |
|
public function index() |
| 23 |
|
{ |
| 24 |
|
$data['products'] = Products::with('category')->paginate(10); |
| 25 |
|
$data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all(); |
| 26 |
|
|
| 27 |
|
return view('products.index', $data); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function categories() |
| 31 |
|
{ |
app/Http/Controllers/WelcomeController.php 1 location
|
@@ 40-46 (lines=7) @@
|
| 37 |
|
* |
| 38 |
|
* @return \Illuminate\Http\Response |
| 39 |
|
*/ |
| 40 |
|
public function signup() |
| 41 |
|
{ |
| 42 |
|
$data["segments"] = Segments::all(); |
| 43 |
|
$data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all(); |
| 44 |
|
|
| 45 |
|
return view('auth.register', $data); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
|
| 49 |
|
} |