Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv committed May 12, 2024
1 parent 98e15e0 commit 30a1dc0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Datas/AnswerData.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
namespace Modules\Chart\Datas;

use Spatie\LaravelData\Data;
use Spatie\LaravelData\DataCollection;
use Illuminate\Database\Eloquent\Collection as EloquentCollection;

class AnswerData extends Data
{
Expand Down Expand Up @@ -33,4 +35,8 @@ class AnswerData extends Data
public ?string $title = null;

public ?string $subtitle = null;

public static function collection(EloquentCollection|array $data):DataCollection{
return self::collect($data, DataCollection::class);
}
}

0 comments on commit 30a1dc0

Please sign in to comment.