1. Go to this page and download the library: Download bozboz/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/ */
bozboz / admin example snippets
<?
...
// set route to images
'route' => 'images',
...
// add path to uploaded images
'paths' => array(
...
public_path('media/image'),
),
use Bozboz\Admin\Decorators\FooAdminDecorator;
class FooAdminController extends ModelAdminController
{
public function __construct(FooAdminDecorator $foo)
{
parent::__construct($foo);
}
}
use Bozboz\Admin\Models\Page;
class PageAdminDecorator extends ModelAdminDecorator
{
public function __construct(Page $page)
{
parent::__construct($page);
}
}
new URLField('slug', [
'route' => '...',
'data-auto-slug-from' => 'name',
]);
public function getSyncRelations()
{
return ['categories'];
}
public function getListRelations()
{
return [
'tags' => 'name'
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.