PHP code example of ingenius / storefront

1. Go to this page and download the library: Download ingenius/storefront library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ingenius / storefront example snippets


Route::middleware(['api'])->prefix('api')->group(function () {
    Route::prefix('shop')->group(function () {
        Route::get('products', [StorefrontController::class, 'products'])->name('shop.products');
    });
});

use Ingenius\Storefront\Actions\ListShopProductsAction;

$products = app(ListShopProductsAction::class)->handle([
    'category_id' => 1,
    'search' => 'keyword',
    'sort' => 'created_at',
    'order' => 'desc',
    'per_page' => 20,
]);
bash
php artisan vendor:publish --tag=storefront-config