PHP code example of teksite / module

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

    

teksite / module example snippets




return [
    // ...
    Teksite\Module\ModuleServiceProvider::class,
];

'providers' => [
    // ...
    Teksite\Module\ModuleServiceProvider::class,
],



return [
    'Blog' => [
        'provider' => 'Lareon\\Modules\\Blog\\App\\Providers\\BlogServiceProvider',
        'active'   => true,
        'type'     => 'lareon',
    ],
    'Page' => [
        'provider' => 'Lareon\\Modules\\Page\\App\\Providers\\PageServiceProvider',
        'active'   => true,
        'type'     => 'self',
    ],
];

'Example' => [
    'provider' => 'Lareon\\Modules\\Example\\App\\Providers\\ExampleServiceProvider',
    'active'   => true,
    'type'     => 'steward', // change to 'self' for self‑managed or steward to managed by Steward
],

/**
 * Module type (self|steward)
 *
 * @var string
 */
protected string $type = "steward"; // change to 'self' for self‑managed or steward to managed by Steward

'Example' => [
    'provider' => 'Lareon\\Modules\\Example\\App\\Providers\\ExampleServiceProvider',
    'active' => true,
    'type' => 'steward', // or 'self'
],


    /**
     * Module type (self|steward)
     *
     * @var string
     */
    protected string $type = "steward"; //self to managed by the module itself or steward to manage by Steward

bash
  php artisan vendor:publish --provider="Teksite\Module\ModuleServiceProvider"
bash
  php artisan cache:clear
  php artisan config:clear
bash
  composer dump-autoload
bash
php artisan module:steward
bash
  php artisan module:make Example
bash
  php artisan module:make-middleware ExampleMiddleware ExampleModule