for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spatie\Translatable\Exceptions;
use Exception;
class InvalidCast extends Exception
{
public static function make(string $cast, array $availableCasts)
$availableCasts = implode(', ', $availableCasts);
return new static("Cannot cast to type `{$cast}`. Available casts are: {$availableCasts}");
}