File "CannotCreateCastAttribute.php"

Full Path: /var/www/html/back/vendor/spatie/laravel-data/src/Exceptions/CannotCreateCastAttribute.php
File size: 551 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Spatie\LaravelData\Exceptions;

use Exception;
use Spatie\LaravelData\Casts\Cast;
use Spatie\LaravelData\Casts\Castable;

class CannotCreateCastAttribute extends Exception
{
    public static function notACast(): self
    {
        $cast = Cast::class;

        return new self("WithCast attribute needs a cast that implements `{$cast}`");
    }

    public static function notACastable(): self
    {
        $cast = Castable::class;

        return new self("WithCastable attribute needs a class that implements `{$cast}`");
    }
}