PHP code example of libinkk / modular
1. Go to this page and download the library: Download libinkk/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/ */
libinkk / modular example snippets
return view('user::dashboard');
__('user::messages.success');
$this->app->bind(
UserRepositoryInterface::class,
UserRepository::class
);
bash
composer dump-autoload
php artisan modular:make User
bash
php artisan modular:make User
bash
php artisan migrate
bash
# Style 1 — module first
php artisan modular:controller User UserController
# Style 2 — --module flag
php artisan modular:controller API/UserController --module=User
# Style 3 — short flag
php artisan modular:controller API/UserController -m=User
bash
php artisan modular:controller User API/Admin/UserController
Modules/User/Controllers/API/Admin/UserController.php
bash
php artisan modular:repository User UserRepository
bash
php artisan modular:service User ProductService
# asks whether to wire ProductController
php artisan modular:service User ProductService --inject
php artisan modular:controller User ProductController --inject
php artisan modular:service User ProductService --no-inject
bash
php artisan modular:crud User Product
bash
php artisan modular:disable User
php artisan modular:enable User
bash
php artisan modular:list
bash
php artisan modular:rename User Customer
bash
php artisan modular:delete User
bash
php artisan modular:cache # Generate cache
php artisan modular:clear # Clear cache