PHP code example of alizharb / laravel-modular

1. Go to this page and download the library: Download alizharb/laravel-modular 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/ */

    

alizharb / laravel-modular example snippets


// Both work!
config('Blog::settings.key');
config('blog::settings.key');

// Get the registry or specific module config
$modules = module();
$blogConfig = module('Blog');

// Get absolute path to a resource
$viewPath = module_path('Blog', 'Resources/views');

// Get absolute path to a config file
$configPath = module_config_path('Blog', 'settings.php');
bash
php artisan modular:install --dry-run
bash
php artisan modular:install
bash
php artisan make:module Blog
bash
php artisan boost:install
bash
php artisan boost:update --discover
bash
php artisan modular:link
bash
php artisan vendor:publish --tag="modular-config"
bash
php artisan modular:test Blog
bash
php artisan modular:refresh
php artisan modular:doctor
php artisan modular:check