PHP code example of techweb-sk / rareadmin

1. Go to this page and download the library: Download techweb-sk/rareadmin 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/ */

    

techweb-sk / rareadmin example snippets


// config/rareadmin.php
'fields' => [
    // ...defaults...
    'stars' => \App\Rareadmin\StarsField::class,
],

class StarsField extends \TechwebSk\Rareadmin\Fields\FieldType
{
    public function baseRules($field): array { return ['integer', 'between:0,5']; }
    public function formView(): string { return 'admin.fields.stars'; }   // your Blade view
}
bash
php artisan vendor:publish --tag=rareadmin-config