Files
online.tbbank.gov.tm-larave…/nova/src/Exceptions/ResourceMissingException.php
2024-09-01 18:54:23 +05:00

31 lines
684 B
PHP

<?php
namespace Laravel\Nova\Exceptions;
use Exception;
use Illuminate\Database\Eloquent\Model;
class ResourceMissingException extends Exception
{
public function __construct(Model $model)
{
parent::__construct(
__('Unable to find Resource for model [:model].', ['model' => get_class($model)])
);
}
/**
* Create a new exception instance.
*
* @param string $resource
* @return static
*/
public static function forRepeater($resource)
{
return new static(__(
"Unable to find Resource for the given resource name [:resource],
['resource' => $resource]
"));
}
}