Support AsCollection::of($map), AsCollection::using($class, $map) (#1714)

* Support `AsCollection::of($map)`, `AsCollection::using($class, $map)`

* test compatibility(`of($map)`,`using($class, $map)` compiled), only laravel `>=12.10`
This commit is contained in:
erikn69
2025-07-17 07:23:52 +02:00
committed by GitHub
parent 1815a6140a
commit 6c4ba2ad38
4 changed files with 34 additions and 1 deletions
@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AdvancedCasts\Collections;
use Illuminate\Contracts\Support\Arrayable;
use JsonSerializable;
class AdvancedCastMap implements Arrayable, JsonSerializable
{
public function toArray(): array
{
return [];
}
public function jsonSerialize(): array
{
return $this->toArray();
}
}