PHP code example of jan-drda / olapus

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

    

jan-drda / olapus example snippets


use Spatie\Permission\Traits\HasRoles;

protected $adminFilters = [
    'owner' => ['relation' => 'owner', 'label' => 'admin_module_project.fields.owner'],
    'label' => ['relation' => 'labels', 'label' => 'admin_module_project.fields.labels'],
];

protected $relationFields = [
    'owner_id' => 'owner',
    'label_ids' => 'labels',
];

protected $adminColumnFilters = [
    'name' => ['type' => 'like', 'label' => 'admin_module_project.fields.name'],
    'created_from' => [
        'column' => 'created_at', 'type' => 'date_from', 'label' => 'admin_filters.created_from',
    ],
    'created_to' => [
        'column' => 'created_at', 'type' => 'date_to', 'label' => 'admin_filters.created_to',
    ],
];
text
app/
    Models/
    Support/
    Console/
        Commands/
    Http/
        Controllers/
        Middleware/

config/
    admin/
        menu.php
    olapus.php

resources/
    css/
    js/
    views/
        admin/

routes/
    web.php
    auth.php
    admin.php
text
config/admin/menu.php
bash
php artisan key:generate
bash
php artisan migrate
text
config/olapus.php
text
resources/views/admin/
    master.blade.php
    head.blade.php
    header.blade.php
    left_sidebar.blade.php
    content.blade.php
    footer.blade.php
    foot.blade.php
text
config/admin/menu.php
bash
php artisan optimize:clear
bash
php artisan about
php artisan route:list
php artisan config:show olapus
bash
php artisan test
bash
php artisan migrate
# Optional, in local/development/testing only; never creates a user:
php artisan db:seed --class=ProjectRelationsDemoSeeder
bash
php artisan db:seed --class=ExternalRelationsDemoSeeder
bash
php artisan make:admin-module DocumentType --icon=bi-file-text --dry-run
php artisan make:admin-module DocumentType --icon=bi-file-text
text
routes/admin_generated.php
config/admin/generated_menu.php
bash
php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan migrate --pretend
php artisan migrate