PHP code example of tur1 / laravelmodules

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

    

tur1 / laravelmodules example snippets


public static function filters()
{
    return [
        Filter::class,
    ];
}

protected $search = ['name', 'email', 'roles.name'];
bash
Modules/
├── Admins/
    ├── Controllers/
    │   └── AdminController.php
    ├── Database/
    │   ├── factories/
    │   │   └── AdminFactory.php
    │   ├── migrations/
    │   │   └── 2024_09_16_xxxxxxx_admins_table.php
    │   └── seeders/
    │       └── AdminSeeder.php
    ├── Enums/
    │   ├── AdminGenderEnum.php
    │   └── AdminStatusEnum.php
    ├── Events/
    │   ├── AdminCreatedEvent.php
    │   ├── AdminDeletedEvent.php
    │   └── AdminUpdatedEvent.php
    ├── Exceptions/
    │   └── AdminException.php
    ├── Filters/
    │   ├── GenderFilter.php
    │   └── StatusFilter.php
    ├── Middleware/
    │   └── AdminMiddleware.php
    ├── Models/
    │   └── Admin.php
    ├── Observers/
    │   └── AdminObserver.php
    ├── Policies/
    │   └── AdminPolicy.php
    ├── Repositories/
    │   └── AdminRepository.php
    ├── Requests/
    │   ├── StoreAdminRequest.php
    │   └── UpdateAdminRequest.php
    ├── Resources/
    │   ├── AdminListResource.php
    │   └── AdminShowResource.php
    ├── Routes/
    │   └── AdminRoutes.php
    ├── Services/
    │   └── AdminService.php
    └── Traits/
        ├── AdminAttributesTrait.php
        ├── AdminRelationshipsTrait.php
        └── AdminScopesTrait.php
bash
php artisan module:create {name}
bash
php artisan module:create Users
bash
php artisan page:create {name}
bash
php artisan page:create Dashboard