This package allows casting and validation of ISBN in Laravel Eloquent models, using the nicebooks/isbn-library.
Via Composer
$ composer require legalworks/laravel-isbn-tools
use Legalworks\IsbnTools\IsbnCast;
protected $casts = [
'isbn' => IsbnCast::class,
];
use Legalworks\IsbnTools\IsbnValidator;
$request->validate([
'isbn' => ['required', 'string', new IsbnValidator],
]);
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email author email instead of using the issue tracker.
license. Please see the license file for more information.