PHP code example of sirserik / admin-core

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

    

sirserik / admin-core example snippets


AdminCore::resource('articles', [
    'model'        => \App\Models\Article::class,
    'label'        => 'Статьи',
    'menu'         => 'Контент',
    'icon'         => 'fa-newspaper',
    'image_field'  => 'featured_image',
    'translatable' => ['title', 'excerpt', 'content'],
    'fields' => [
        ['name' => 'title',   'type' => 'text',     'label' => 'Заголовок', ''],
        ['name' => 'published_at', 'type' => 'datetime-local', 'label' => 'Дата публикации'],
    ],
]);

use Meta\AdminCore\Facades\AdminCore;

AdminCore::resource('articles', [
    'model' => \App\Models\Article::class,
    // ...
]);

$middleware->web(append: [
    \Meta\AdminCore\Http\Middleware\HandleInertiaRequests::class,
]);