PHP code example of hasinhayder / tyro-dashboard

1. Go to this page and download the library: Download hasinhayder/tyro-dashboard 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/ */

    

hasinhayder / tyro-dashboard example snippets


use HasinHayder\TyroDashboard\Concerns\HasCrud;

class Product extends Model
{
    use HasCrud;
}

'resources' => [
    'products' => [
        'model' => App\Models\Product::class,
        'roles' => ['admin', 'manager'],
        'fields' => [
            'name' => ['type' => 'text', '> ['type' => 'file'],
            'is_active' => ['type' => 'checkbox', 'default' => true],
        ],
    ],
]

use HasinHayder\TyroDashboard\Services\AdminNotice;

AdminNotice::show('Sale ends in 24 hours! <b>Don\'t miss out!</b>');
AdminNotice::show('Server SSD capacity is critically low (< 5%).', '#dc2626', '#ffffff');
bash
composer tyro-dashboard:install
bash
php artisan tyro-dashboard:publish --config
bash
php artisan tyro-dashboard:update-config
bash
php artisan tyro-dashboard:update
bash
php artisan migrate
php artisan storage:link
bash
php artisan migrate
php artisan storage:link