PHP code example of connor-lock05 / laravel-admin

1. Go to this page and download the library: Download connor-lock05/laravel-admin 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/ */

    

connor-lock05 / laravel-admin example snippets


public static function getModifiableFields(): array
{
    return [
        'title' => new Text(),
        'user_id' => new Related(User::class, 'name'),
        'body' => new TextArea()
    ];
}

public static function getFieldsForIndexView(): array
{
    return [
        'name',
        'email'
    ];
}
bash
php artisan admin:install
bash
php artisan vendor:publish --tag="admin-config"
bash
php artisan vendor:publish --tag="admin-views"