PHP code example of blemli / softrequired-for-filament
1. Go to this page and download the library: Download blemli/softrequired-for-filament 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/ */
blemli / softrequired-for-filament example snippets
// Form — declare once, right where d(),
TextInput::make('company')->softRequired(warn: false), // counts, but never nags
// Model — add the trait; the fields are introspected from your form:
use Completable;
Customer::incomplete()->count(); // scope, derived from the form
$customer->getIncompleteAttributes(); // ['email' => 'Email']
bash
composer soft