PHP code example of wamesk / laravel-nova-inline-badge-field
1. Go to this page and download the library: Download wamesk/laravel-nova-inline-badge-field 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/ */
wamesk / laravel-nova-inline-badge-field example snippets
use Wame\LaravelNovaInlineBadgeField\Fields\InlineBadge;
InlineBadge::make('Status')->map([
'draft' => 'danger',
'published' => 'success',
])->labels([
'draft' => 'Draft',
'published' => 'Published',
]),
->styles([
'draft' => 'background-color: #ff0000;',
'published' => 'background-color: #008000;',
])
BelongsTo::make(__('order.field.company'), 'company', Company::class)
->