I need to caution this answer first with the following: I have not tested this code; secondly, I never had a requirement to use this.
With that said, there is a static property available on eloquent models:
public static $snakeAttributes = true;
By switching this to false, you disable the snake shell with the attribute names and relationship names on the model. This should have the desired result you are looking for.
, cacheMutatedAttributes, , , , , .
if (static::$snakeAttributes) {
$match = Str::snake($match);
}
, , . , , . , - AppServiceProvider:
public function boot()
{
\Illuminate\Database\Eloquent\Model::$snakeAttributes = false;
}