PHP code example of internetguru / laravel-model-browser

1. Go to this page and download the library: Download internetguru/laravel-model-browser 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/ */

    

internetguru / laravel-model-browser example snippets


    model="App\Models\User"
    // or
    model="App\Models\User@summary"
    

    :filterAttributes="['created_at', 'name', 'email', 'last_login', 'last_activity', 'is_active']"
    

    :viewAttributes="[
        'created_at' => __('summary.created_at'),
        'name' => __('summary.name'),
        'email' => __('summary.email'),
        'last_login' => __('summary.last_login'),
        'last_activity' => __('summary.last_activity'),
        'is_active' => __('summary.is_active'),
    ]"
    

    :formats="[
        'created_at' =>  [
            'up' => 'formatDateTime',
            'down' => 'globalFormatDown',
        ],
        'name' => 'formatUserDetailLink',
        'email' => 'formatEmailLink',
        'last_login' =>  [
            'up' => 'formatDateTime',
            'down' => 'globalFormatDown',
        ],
        'last_activity' =>  [
            'up' => 'formatDateTime',
            'down' => 'globalFormatDown',
        ],
        'is_active' => [
            'up' => 'formatBoolean',
            'down' => 'formatBooleanDown',
        ],
    ]"
    

    :alignments="[
        'created_at' => 'start',
        'last_activity' => 'end',
        'is_active' => 'center',
    ]"
    

    :lightDarkStep="2"