| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | namespace FluentSupport\App\Http\Controllers; |
| 4 | 4 | |
| 5 | 5 | use FluentSupport\App\Http\Requests\ProductRequest; |
| 6 | 6 | use FluentSupport\App\Models\Product; |
| 7 | -use FluentSupport\Framework\Request\Request; | |
| 7 | +use FluentSupport\Framework\Http\Request\Request; | |
| 8 | 8 | |
| 9 | 9 | class ProductController extends Controller |
| 10 | 10 | { |
| 11 | 11 | /** |
| @@ -13,9 +13,9 @@ | ||
| 13 | 13 | * @param Request $request |
| 14 | 14 | * @param Product $product |
| 15 | 15 | * @return array |
| 16 | 16 | */ |
| 17 | - public function index ( Request $request, Product $product ) | |
| 17 | + public function index( Request $request, Product $product ) | |
| 18 | 18 | { |
| 19 | 19 | return $product->getProducts( $request->getSafe('search', 'sanitize_text_field') ); |
| 20 | 20 | } |
| 21 | 21 | |
| @@ -24,9 +24,9 @@ | ||
| 24 | 24 | * @param Product $product |
| 25 | 25 | * @param int $product_id |
| 26 | 26 | * @return array |
| 27 | 27 | */ |
| 28 | - public function get ( Product $product, $product_id ) | |
| 28 | + public function get( Product $product, $product_id ) | |
| 29 | 29 | { |
| 30 | 30 | return $product->getProduct( $product_id ); |
| 31 | 31 | } |
| 32 | 32 | |
| @@ -36,9 +36,9 @@ | ||
| 36 | 36 | * @param Product $product |
| 37 | 37 | * @return array |
| 38 | 38 | * @throws \FluentSupport\Framework\Validator\ValidationException |
| 39 | 39 | */ |
| 40 | - public function create ( ProductRequest $request, Product $product ) | |
| 40 | + public function create( ProductRequest $request, Product $product ) | |
| 41 | 41 | { |
| 42 | 42 | $data = $request->all(); |
| 43 | 43 | |
| 44 | 44 | return $product->createProduct( $data ); |
| @@ -52,9 +52,9 @@ | ||
| 52 | 52 | * @param int $product_id |
| 53 | 53 | * @return array |
| 54 | 54 | * @throws \FluentSupport\Framework\Validator\ValidationException |
| 55 | 55 | */ |
| 56 | - public function update ( ProductRequest $request, Product $product, $product_id ) | |
| 56 | + public function update( ProductRequest $request, Product $product, $product_id ) | |
| 57 | 57 | { |
| 58 | 58 | $data = $request->all(); |
| 59 | 59 | |
| 60 | 60 | return $product->updateProduct( $product_id, $data ); |
| @@ -65,9 +65,9 @@ | ||
| 65 | 65 | * @param Product $product |
| 66 | 66 | * @param int $product_id |
| 67 | 67 | * @return array |
| 68 | 68 | */ |
| 69 | - public function delete ( Product $product, $product_id ) | |
| 69 | + public function delete( Product $product, $product_id ) | |
| 70 | 70 | { |
| 71 | 71 | return $product->deleteProduct( $product_id ); |
| 72 | 72 | } |
| 73 | 73 | } |