PHP code example of p4scu41 / basecrudapi

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

    

p4scu41 / basecrudapi example snippets


p4scu41\BaseCRUDApi\BaseCRUDApiServiceProvider::class,

            'enabled' => true,
            'use_middleware' => true,
            'do_not_track_paths' => [
                // 'api/*',
            ],
            'do_not_track_ips' => [
                '127.0.0.0/24', // Local: range 127.0.0.1 - 127.0.0.255
                '192.168.0.0/24', // Megacable
                '192.168.1.0/24', // Infinitum
            ],
            'log_untrackable_sessions' => false,
            'log_enabled' => true,
            'console_log_enabled' => true,
            'geoip_database_path' => storage_path('geoip'),
            'log_geoip' => true,
            'log_user_agents' => true,
            'log_users' => true,
            'log_devices' => true,
            'log_languages' => true,
            'log_referers' => true,
            'log_paths' => true,
            'log_queries' => true,
            'log_routes' => true,
            'user_model' => p4scu41\BaseCRUDApi\Models\User::class,
            'stats_panel_enabled' => true,
        
bash
php artisan vendor:publish --provider="p4scu41\BaseCRUDApi\BaseCRUDApiServiceProvider" --tag="config"