1 | <?php namespace App\Http\Controllers; |
||
10 | class ProductController extends Controller |
||
11 | { |
||
12 | protected $repository; |
||
13 | |||
14 | public function __construct(ProductRepository $repository) |
||
18 | |||
19 | /** |
||
20 | * Get all products in REST format |
||
21 | * |
||
22 | * @link GET /app/stock/product/ |
||
23 | */ |
||
24 | public function index() |
||
29 | |||
30 | /** |
||
31 | * Store a new product in the DB |
||
32 | * |
||
33 | * @link POST /app/stock/product/ |
||
34 | */ |
||
35 | public function store(Request $request, CategoryRepository $categoryRepository) |
||
42 | |||
43 | /** |
||
44 | * Get a product in REST format |
||
45 | * |
||
46 | * @link GET /app/stock/product/{id} |
||
47 | */ |
||
48 | public function show($id) |
||
59 | |||
60 | /** |
||
61 | * Update the specified product in the DB |
||
62 | * |
||
63 | * @link PUT /app/stock/product/{id} |
||
64 | */ |
||
65 | public function update(Request $request, $id) |
||
70 | |||
71 | /** |
||
72 | * Remove the specified product from storage. |
||
73 | * |
||
74 | * @link DELETE /app/stock/product/{id} |
||
75 | */ |
||
76 | public function destroy($id) |
||
81 | |||
82 | } |
||
83 |