PHP code example of black-paradise / core-admin
1. Go to this page and download the library: Download black-paradise/core-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/ */
black-paradise / core-admin example snippets
return [
'title' => 'BPAdmin',
'userEntity' => \App\Models\User::class,
'languages' => ['en'],
'entities' => [
'users' => \App\Models\User::class,
],
'menu' => [
'users' => [
'icon' => 'mdi-account-group',
'items' => [
'users' => [
'icon' => 'mdi-account-group',
],
],
],
],
];
namespace App\BPAdmin;
use BlackParadise\LaravelAdmin\Core\Models\BPModel;
class Users extends BPModel
{
public string $model = \App\Models\User::class;
public string $filePath = 'users';
public string $name = 'users';
protected array $fieldTypes = [
'first_name' => [
'type' => 'string',
' 'email',
' 'type' => 'boolean',
'rname',
'email'
];
public array $tableHeaderFields = [
'first_name',
'second_name',
'surname',
'email'
];
public array $showPageFields = [
'id',
'first_name',
'email',
'role_id',
];
}
return [
'name' => 'Name',
'email' => 'Email',
'role_id' => 'Role ID',
'actions' => 'Actions',
];
sh
php artisan bpadmin:install
sh
php artisan bpadmin:translation-generate