### Run Interactive Installation Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/artisan-commands.md Executes the interactive installation wizard for environment setup, database configuration, and admin creation. ```bash php artisan bagisto:install ``` -------------------------------- ### Run Unattended Installation with Demo Data Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/artisan-commands.md Executes an automated installation and seeds the database with sample product data. ```bash php artisan bagisto:install --no-interaction --demo-samples ``` -------------------------------- ### Install MySQL Client Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Installs the MySQL client on the application EC2 instance. ```bash sudo apt-get install mysql-client-8.0 ``` -------------------------------- ### Install Varnish Package Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-varnish.md Install the Varnish integration package using Composer. ```bash composer require bagisto/bagisto-varnish ``` -------------------------------- ### Install Dependencies Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/upgrade-guide.md Install the required PHP dependencies using Composer. ```bash composer install ``` -------------------------------- ### Install Bagisto Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Run the Bagisto installation command using the Sail binary. ```bash vendor/bin/sail artisan bagisto:install ``` -------------------------------- ### Install Dependencies Source: https://github.com/bagisto/bagisto-docs/blob/master/README.md Run this command in your project directory to install all necessary Node.js dependencies. ```bash npm install ``` -------------------------------- ### Start Development Server Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Launches the local development server to preview the store. ```bash php artisan serve ``` -------------------------------- ### Install Varnish Package Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Use Composer to install the Bagisto Varnish integration package. ```bash composer require bagisto/bagisto-varnish ``` -------------------------------- ### Sync Product Example Source: https://github.com/bagisto/bagisto-docs/blob/master/src/api/rest-api.md Example of syncing product data from an external system using the REST API. ```APIDOC ## Sync Product Example ### Description This PHP example shows how to sync product information from an external system to Bagisto using a POST request. ### Method POST ### Endpoint `/api/v1/admin/catalog/products/{productId}` ### Headers - `Authorization`: `Bearer YOUR_TOKEN_HERE` - `Accept`: `application/json` ### Request Body - `name` (string) - Required - The name of the product. - `sku` (string) - Required - The Stock Keeping Unit for the product. - `price` (float) - Required - The price of the product. ### Request Example ```php // Example: Sync product from external system $response = Http::withToken($token)->post("/api/v1/admin/catalog/products/{$productId}", [ 'name' => 'Product Name', 'sku' => 'PROD-001', 'price' => 99.99 ]); ``` ``` -------------------------------- ### Run Bagisto REST API Installation Command Source: https://github.com/bagisto/bagisto-docs/blob/master/src/api/rest-api.md Execute the bagisto-rest-api:install Artisan command to configure Swagger documentation and authentication routes. This command automates setup tasks. ```bash php artisan bagisto-rest-api:install ``` -------------------------------- ### Install MySQL Client Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-load-balancing.md Installs the MySQL client utility on the Bagisto application server to connect to the dedicated database server. ```bash sudo apt-get install mysql-client-8.0 ``` -------------------------------- ### Initialize Bagisto Services Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Execute the setup script to build images and initialize the environment. ```bash sh setup.sh ``` -------------------------------- ### Install Bagisto REST API Package Source: https://github.com/bagisto/bagisto-docs/blob/master/src/api/rest-api.md Install the REST API package using Composer. This is the first step in setting up the API. ```bash composer require bagisto/rest-api ``` -------------------------------- ### Install and Publish GraphQL Assets Source: https://github.com/bagisto/bagisto-docs/blob/master/src/api/graphql-api.md Run the Artisan command to install and publish GraphQL assets. This sets up schema files, authentication routes, and the GraphiQL playground. ```bash php artisan bagisto-graphql:install ``` -------------------------------- ### Install package dependencies Source: https://github.com/bagisto/bagisto-docs/blob/master/src/theme-development/vite-powered-theme-assets.md Commands to navigate to the package directory and install the defined Node dependencies. ```bash # Make sure you're in your package directory cd packages/Webkul/CustomTheme # Install dependencies npm install ``` -------------------------------- ### Install Flutter Dependencies Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Command to fetch and install required project packages. ```bash flutter pub get ``` -------------------------------- ### Build and Start Sail Services Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Commands to build the Docker containers and start the development environment services. ```bash # Build containers vendor/bin/sail build --no-cache # Start services in background vendor/bin/sail up -d ``` -------------------------------- ### Example Directory Structure Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/understanding-data-transfer.md This is the expected directory structure for your Bagisto admin import package. ```bash └── packages └── Webkul └── AdminImport ├── src │ ├── Config │ │ └── importers.php │ ├── Importers │ │ └── AdminImporter.php │ └── Providers │ └── AdminImportServiceProvider.php └── composer.json ``` -------------------------------- ### Run Installation Command Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Execute the artisan command to publish configuration files and set up Swagger documentation. ```bash php artisan bagisto-rest-api:install ``` -------------------------------- ### Fetch Products Example Source: https://github.com/bagisto/bagisto-docs/blob/master/src/api/rest-api.md Example of fetching products using the REST API, suitable for mobile app development. ```APIDOC ## Fetch Products Example ### Description This JavaScript example demonstrates how to fetch a list of products from the API, typically used in mobile applications. ### Method GET ### Endpoint `/api/v1/products` ### Headers - `Authorization`: `Bearer YOUR_TOKEN_HERE` - `Accept`: `application/json` ### Request Example ```javascript // Example: Fetch products for mobile app fetch('/api/v1/products', { headers: { 'Authorization': 'Bearer ' + token, 'Accept': 'application/json' } }) .then(response => response.json()) .then(products => { // Display products in your mobile app }); ``` ``` -------------------------------- ### Run Unattended Installation Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/artisan-commands.md Performs an automated installation using existing environment configuration without interactive prompts. ```bash php artisan bagisto:install --no-interaction ``` -------------------------------- ### Install Octane Server Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Choose and install your preferred Octane server. This command sets up the necessary configuration for the selected server. ```bash php artisan octane:install --server=swoole ``` ```bash php artisan octane:install --server=frankenphp ``` ```bash php artisan octane:install --server=roadrunner ``` -------------------------------- ### Install Laravel Octane and Configure Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Install the Laravel Octane package using Composer and initiate the configuration process, which includes selecting a server. ```bash # Navigate to your Bagisto project cd /path/to/your/bagisto # Install Laravel Octane composer require laravel/octane # Install Octane (will prompt for server selection) php artisan octane:install ``` -------------------------------- ### Copy Environment File Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/upgrade-guide.md Copy the .env file from the old project to the new installation. ```bash cp /path/to/old-project/.env .env ``` -------------------------------- ### Display Bagisto Version Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Outputs the currently installed version of the Bagisto framework. ```bash php artisan bagisto:version ``` ```text 2.4.0-beta6 ``` -------------------------------- ### Setup Database and Storage Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Runs database migrations, seeds the database, links storage, and clears cache. ```bash php artisan migrate:fresh --seed php artisan storage:link php artisan optimize:clear ``` -------------------------------- ### Start the development server Source: https://github.com/bagisto/bagisto-docs/blob/master/src/theme-development/vite-powered-theme-assets.md Navigate to the custom theme package directory and initiate the Vite development server. ```bash cd packages/Webkul/CustomTheme npm run dev ``` -------------------------------- ### Custom Repository Method: getRecent Source: https://github.com/bagisto/bagisto-docs/blob/master/src/package-development/repositories.md Example of a custom repository method to fetch the most recent return requests, ordered by creation date. It uses `orderBy`, `limit`, and `get`. ```php /** * Get recent return requests. */ public function getRecent(int $limit = 10) { return $this->orderBy('created_at', 'desc') ->limit($limit) ->get(); } ``` -------------------------------- ### Install Bagisto via Composer Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Creates a new Bagisto project using the Composer package manager. ```bash composer create-project bagisto/bagisto ``` -------------------------------- ### Get Bagisto Version Number Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/understanding-core-class.md Retrieve the current version number of your Bagisto installation using the `core()->version()` method. This is useful for compatibility checks or displaying version information. ```php $version = core()->version(); // Returns: "2.4.1" ``` -------------------------------- ### Verify RoadRunner Installation Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Check if the RoadRunner binary is installed and executable. ```bash ./rr version ``` -------------------------------- ### Authentication Example Source: https://github.com/bagisto/bagisto-docs/blob/master/src/api/rest-api.md Demonstrates how to authenticate with the REST API using a Bearer token and make a request. ```APIDOC ## Authentication Example ### Description This example shows how to include an authorization token in your API requests. ### Method GET ### Endpoint `http://localhost/public/api/v1/admin/get` ### Headers - `Authorization`: `Bearer YOUR_TOKEN_HERE` - `Accept`: `application/json` ### Request Example ```bash curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \ -H "Accept: application/json" \ http://localhost/public/api/v1/admin/get ``` ``` -------------------------------- ### Verify FrankenPHP Installation Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Confirm the FrankenPHP binary is installed and accessible. ```bash ./frankenphp version ``` -------------------------------- ### Manual Repository Creation Steps Source: https://github.com/bagisto/bagisto-docs/blob/master/src/package-development/repositories.md Demonstrates the manual steps to create a repository directory and file structure within a Bagisto package. ```bash mkdir -p packages/Webkul/RMA/src/Repositories ``` ```text packages └── Webkul └── RMA └── src ├── ... └── Repositories └── ReturnRequestRepository.php ``` -------------------------------- ### Start Development Server Source: https://github.com/bagisto/bagisto-docs/blob/master/README.md Use this command to launch the development server with hot-reloading enabled for documentation changes. ```bash npm run docs:dev ``` -------------------------------- ### Get Current Locale Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/understanding-core-class.md Gets the currently active locale in the system. ```php $currentLocale = core()->getCurrentLocale(); ``` -------------------------------- ### Initialize MySQL Database Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Creates the database, user, and grants necessary permissions for Bagisto. ```sql sudo mysql -u root -p CREATE DATABASE bagistodb; CREATE USER 'bagistouser'@'localhost' IDENTIFIED BY ''; GRANT ALL ON bagistodb.* TO 'bagistouser'@'localhost' WITH GRANT OPTION; SET GLOBAL log_bin_trust_function_creators = 1; FLUSH PRIVILEGES; EXIT; ``` -------------------------------- ### Create Bagisto Project Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Initializes a new Bagisto project using Composer. ```bash composer create-project bagisto/bagisto my-bagisto-store ``` -------------------------------- ### Install Laravel Octane Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Use Composer to install the Laravel Octane package. ```bash composer require laravel/octane ``` -------------------------------- ### Set Up Development Workflow Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Commands to manage theme views during development using symbolic links or manual republishing. ```bash # Remove the published views directory (backup first if you have changes) rm -rf resources/themes/custom-theme # Create symbolic link to your package views (from Bagisto root directory) ln -s $(pwd)/packages/Webkul/CustomTheme/src/Resources/views resources/themes/custom-theme ``` ```bash # After making changes, republish views php artisan vendor:publish --provider="Webkul\CustomTheme\Providers\CustomThemeServiceProvider" --force ``` -------------------------------- ### Verify Swoole Installation Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Check if the Swoole PHP extension is installed on your system. ```bash php --ri swoole ``` -------------------------------- ### Start Vite development server Source: https://github.com/bagisto/bagisto-docs/blob/master/src/theme-development/vite-powered-theme-assets.md Initialize the development server within the package directory to enable asset compilation. ```bash # Make sure you're in your package directory cd packages/Webkul/CustomTheme # Start the development server npm run dev ``` -------------------------------- ### Configure Environment and Key Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/installation.md Initializes the environment file and generates the application encryption key. ```bash cp .env.example .env php artisan key:generate ``` -------------------------------- ### Get Channel Timestamp Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/understanding-core-class.md Gets a timestamp adjusted for the current channel's timezone. ```php $timestamp = core()->channelTimeStamp($channel); ``` -------------------------------- ### Create Package Structure Source: https://github.com/bagisto/bagisto-docs/blob/master/src/product-type-development/create-your-first-product-type.md Sets up the necessary directory structure for a new custom product type package. ```bash mkdir -p packages/Webkul/SubscriptionProduct/src/{Type,Config,Providers} ``` -------------------------------- ### Install Laravel Octane Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Commands to install the Octane package and configure the Swoole server within a Bagisto project. ```bash # Navigate to your Bagisto project cd /path/to/your/bagisto # Install Laravel Octane composer require laravel/octane # Install Octane with Swoole server php artisan octane:install --server=swoole ``` -------------------------------- ### Create Admin and Shop Controller Directories Source: https://github.com/bagisto/bagisto-docs/blob/master/src/package-development/controllers.md Sets up the necessary directory structure for admin and shop controllers within a package. ```bash mkdir -p packages/Webkul/RMA/src/Http/Controllers/Admin mkdir -p packages/Webkul/RMA/src/Http/Controllers/Shop ``` -------------------------------- ### Install MySQL Server Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-load-balancing.md Installs the MySQL server package on your EC2 instance. Ensure the system is updated first. ```bash sudo apt-get install mysql-server ``` -------------------------------- ### Build Documentation for Production Source: https://github.com/bagisto/bagisto-docs/blob/master/README.md This script generates a production-ready build of the documentation. ```bash npm run docs:build ``` -------------------------------- ### Check Elasticsearch Installation via CLI Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-elasticsearch.md An alternative method to verify Elasticsearch installation using the curl command. ```bash curl -X GET 'http://localhost:9200' ``` -------------------------------- ### Verify Elasticsearch Installation Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-elasticsearch.md Check if Elasticsearch is running by accessing its default port. This response indicates a successful installation. ```json { "name" : "webkul-pc", "cluster_name" : "elasticsearch", "cluster_uuid" : "suPotT8zQjCOlq9dteWKyQ", "version" : { "number" : "8.17.0", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "2b6a7fed44faa321997703718f07ee0420804b41", "build_date" : "2024-12-11T12:08:05.663969764Z", "build_snapshot" : false, "lucene_version" : "9.12.0", "minimum_wire_compatibility_version" : "7.17.0", "minimum_index_compatibility_version" : "7.0.0" }, "tagline" : "You Know, for Search" } ``` -------------------------------- ### Registering Routes in RMAServiceProvider Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Use the boot method to load route files from the package directory. Ensure the paths point correctly to your defined route files. ```php loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); $this->loadRoutesFrom(__DIR__ . '/../Routes/admin-routes.php'); $this->loadRoutesFrom(__DIR__ . '/../Routes/shop-routes.php'); } } ``` -------------------------------- ### Get Country Name by Code Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/understanding-core-class.md Get the full country name using its ISO 3166-1 alpha-2 code. ```php $countryName = core()->country_name($code); ``` -------------------------------- ### Create Theme Directory Structure Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Use the command line to generate the necessary folder hierarchy for the new theme. ```bash # Create theme directory structure mkdir -p resources/themes/custom-theme/views/home ``` -------------------------------- ### Create Admin Menu Directory Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Command to initialize the configuration directory for the RMA package. ```bash mkdir -p packages/Webkul/RMA/src/Config ``` -------------------------------- ### Create Package Directory Structure Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Use these commands to initialize the required directory hierarchy for a new theme package. ```bash # Create package directory structure mkdir -p packages/Webkul/CustomTheme/src/Providers mkdir -p packages/Webkul/CustomTheme/src/Resources/views ``` -------------------------------- ### Example Crontab Entries for Scheduled Commands Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/queue-jobs-scheduling.md Examples of how to schedule specific Bagisto commands or the general Laravel scheduler in your crontab. ```bash # Laravel scheduler (handles all scheduled commands) * * * * * cd /var/www/html/bagisto && php artisan schedule:run >> /dev/null 2>&1 # Or run specific commands directly: 0 3 * * * cd /var/www/html/bagisto && php artisan invoice:cron >> /dev/null 2>&1 0 4 * * * cd /var/www/html/bagisto && php artisan exchange-rate:update >> /dev/null 2>&1 */5 * * * * cd /var/www/html/bagisto && php artisan campaign:process >> /dev/null 2>&1 0 2 * * * cd /var/www/html/bagisto && php artisan indexer:index >> /dev/null 2>&1 ``` -------------------------------- ### Artisan Commands for Setup and Cache Source: https://github.com/bagisto/bagisto-docs/blob/master/src/package-development/models.md Utilize Artisan commands for managing database migrations and clearing caches to ensure a smooth development and testing process. ```bash php artisan tinker ``` ```bash php artisan migrate:status ``` ```bash php artisan optimize:clear ``` ```bash php artisan migrate ``` ```bash composer dump-autoload ``` -------------------------------- ### Install RoadRunner HTTP and CLI Packages Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Optionally install the RoadRunner HTTP and CLI packages for enhanced functionality with the RoadRunner server. ```bash # Install RoadRunner CLI and HTTP packages (optional) composer require spiral/roadrunner-http spiral/roadrunner-cli ``` -------------------------------- ### Install Bagisto Package Generator Source: https://github.com/bagisto/bagisto-docs/blob/master/src/package-development/getting-started.md Install the package generator using Composer. This command should be run in the root directory of your Bagisto application. ```bash composer require bagisto/bagisto-package-generator ``` -------------------------------- ### Create RMA Package Directory Structure Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Use these commands to initialize the necessary directory structure for controllers. ```bash mkdir -p packages/Webkul/RMA/src/Http/Controllers/Admin mkdir -p packages/Webkul/RMA/src/Http/Controllers/Shop ``` -------------------------------- ### Create Admin Theme Directory Structure Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Use the command line to generate the necessary folder structure for the new theme. ```bash # Create admin theme directory structure mkdir -p resources/admin-themes/custom-admin-theme/views/dashboard ``` -------------------------------- ### Get Requested Locale Code Source: https://github.com/bagisto/bagisto-docs/blob/master/src/advanced/understanding-core-class.md Gets the locale code from the request, with an optional fallback. Defaults to 'locale' key and true for fallback. ```php $localeCode = core()->getRequestedLocaleCode($localeKey = 'locale', $fallback = true); ``` -------------------------------- ### Create Package Directory Structure Source: https://github.com/bagisto/bagisto-docs/blob/master/src/theme-development/creating-custom-theme-package.md Sets up the necessary directories for a Bagisto theme package, following Laravel conventions. ```bash mkdir -p packages/Webkul/CustomTheme/src/Providers mkdir -p packages/Webkul/CustomTheme/src/Resources/views ``` -------------------------------- ### Start Octane Server Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Run the Artisan command to start the Laravel Octane server, which will use the server configured in your .env file. ```bash php artisan octane:start ``` -------------------------------- ### Sync Product Data (PHP) Source: https://github.com/bagisto/bagisto-docs/blob/master/src/api/rest-api.md Example using PHP's Http client to sync product data. This snippet demonstrates making a POST request to update or create a product, requiring an authentication token. ```php // Example: Sync product from external system $response = Http::withToken($token)->post("/api/v1/admin/catalog/products/{$productId}", [ 'name' => 'Product Name', 'sku' => 'PROD-001', 'price' => 99.99 ]); ``` -------------------------------- ### PHPDoc Example Source: https://github.com/bagisto/bagisto-docs/blob/master/src/getting-started/contribution-guide.md An example of a PHPDoc block documenting a PHP method, including parameter types, return types, and a brief description. ```php /** * Register a service with CoreServiceProvider. * * @param string|array $loader * @param \Closure|string|null $concrete * @param bool $shared * @return void */ protected function registerFacades($loader, $concrete = null, $shared = false): void { // Implementation here } ``` -------------------------------- ### Configure MySQL Database and User Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-load-balancing.md Sets up the Bagisto database and a dedicated user with necessary privileges. Replace '' with a strong password. ```sql sudo mysql -u root -p CREATE DATABASE bagistodb; CREATE USER 'bagistouser'@'localhost' IDENTIFIED BY ''; GRANT ALL ON bagistodb.* TO 'bagistouser'@'localhost' WITH GRANT OPTION; SET GLOBAL log_bin_trust_function_creators = 1; FLUSH PRIVILEGES; EXIT; ``` -------------------------------- ### Example Workflow: Enable Tracer Source: https://github.com/bagisto/bagisto-docs/blob/master/src/theme-development/blade-tracer.md This snippet shows the configuration step to enable the Blade Tracer within the `config/view.php` file as part of a typical development workflow. ```php // config/view.php 'tracer' => true, ``` -------------------------------- ### Install Octane with Specific Server Source: https://github.com/bagisto/bagisto-docs/blob/master/src/performance/configure-laravel-octane.md Install Laravel Octane and directly configure it for a specific server (Swoole, FrankenPHP, or RoadRunner) without an interactive prompt. ```bash # Install with Swoole php artisan octane:install --server=swoole ``` ```bash # Install with FrankenPHP php artisan octane:install --server=frankenphp ``` ```bash # Install with RoadRunner php artisan octane:install --server=roadrunner ``` -------------------------------- ### Install GraphQL API Package Source: https://github.com/bagisto/bagisto-docs/blob/master/src/api/graphql-api.md Install the GraphQL API package using Composer. This is the first step to enable GraphQL functionality in your Bagisto project. ```bash composer require bagisto/graphql-api ``` -------------------------------- ### Run Indexer Command Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Executes the manual indexing process for all existing products in the database. ```bash php artisan indexer:index ``` -------------------------------- ### Manual Directory Creation for Contract Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Create the directory structure for the contract manually. ```bash mkdir -p packages/Webkul/RMA/src/Contracts ``` -------------------------------- ### Custom Theme Home Page Example Source: https://github.com/bagisto/bagisto-docs/blob/master/src/theme-development/understanding-layouts.md An example of using the shop layout for a custom theme's home page, including a hero section and featured products area. ```blade {{-- File: packages/Webkul/CustomTheme/src/Resources/views/home/index.blade.php --}} Custom Theme Home {{-- Hero Section --}}

Welcome to Our Store

Professional theme with modern design

Start Shopping
{{-- Featured Products --}}

Featured Products

``` -------------------------------- ### PHPDoc Method Documentation Example Source: https://github.com/bagisto/bagisto-docs/blob/master/src/public/llms-full.txt Standard PHPDoc block for documenting method parameters and return types within Bagisto services. ```php /** * Register a service with CoreServiceProvider. * * @param string|array $loader * @param \Closure|string|null $concrete * @param bool $shared * @return void */ protected function registerFacades($loader, $concrete = null, $shared = false): void { // Implementation here } ``` -------------------------------- ### Example Blade Template for Custom Theme Source: https://github.com/bagisto/bagisto-docs/blob/master/src/theme-development/creating-custom-theme-package.md This is an example Blade template for the home page of a custom theme package. It uses custom layout components and includes basic styling. ```blade Custom Theme Home

🎨 Custom Theme Package

This theme is now powered by a professional package structure!

📦 Package Benefits

Better organization, easy distribution, and professional development workflow.

```