♻️ Replace App\Model with App\Data
This commit is contained in:
parent
70e4404c22
commit
7f4f005302
12 changed files with 393 additions and 222 deletions
16
app/Data/FileData.php
Normal file
16
app/Data/FileData.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data;
|
||||
|
||||
use Spatie\LaravelData\Attributes\WithCast;
|
||||
|
||||
class FileData extends Data
|
||||
{
|
||||
#[WithCast(Casts\File::class)]
|
||||
public string $path;
|
||||
|
||||
public static function fromString(string $path): static
|
||||
{
|
||||
return static::from(['path' => $path]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue