PHP code example of dotburo / nova-log-level-field
1. Go to this page and download the library: Download dotburo/nova-log-level-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/ */
dotburo / nova-log-level-field example snippets
// for example, in app/Nova/Post.php
use Dotburo\NovaLogLevel\LogLevelField;
use Psr\Log\LogLevel;
// ...
public function fields(Request $request) {
return [
LogLevelField::make('Level')
// Optional, show a small badge
->small()
// Optional, override one or more default colors
->colors([
LogLevel::EMERGENCY => '#000000',
]),
];
}