Add Laravel 11 Support
This commit is contained in:
parent
6d8e9de3d7
commit
77cfe9bbc7
|
@ -23,13 +23,13 @@
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"spatie/laravel-medialibrary": "^11.0",
|
"spatie/laravel-medialibrary": "^11.0",
|
||||||
"laravel/framework": "^10.0",
|
"laravel/framework": "^11.0",
|
||||||
"spatie/laravel-data": "^3.1",
|
"spatie/laravel-data": "^4.0",
|
||||||
"pestphp/pest": "^2.0"
|
"pestphp/pest": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"orchestra/testbench": "^8.0",
|
"orchestra/testbench": "^9.0",
|
||||||
"illuminate/console": "^10.0"
|
"illuminate/console": "^11.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"post-autoload-dump": [
|
"post-autoload-dump": [
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,7 +23,7 @@ class DeferredMediaData extends Data
|
||||||
|
|
||||||
public static function fromPath(string $path, MediaCollection $collection): self
|
public static function fromPath(string $path, MediaCollection $collection): self
|
||||||
{
|
{
|
||||||
return static::withoutMagicalCreationFrom([
|
return self::factory()->withoutMagicalCreation()->from([
|
||||||
'path' => Lazy::create(fn () => $path),
|
'path' => Lazy::create(fn () => $path),
|
||||||
'collection_name' => $collection->name,
|
'collection_name' => $collection->name,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -47,7 +47,7 @@ class MediaData extends Data
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
return self::withoutMagicalCreationFrom([
|
return self::factory()->withoutMagicalCreation()->from([
|
||||||
...$media->toArray(),
|
...$media->toArray(),
|
||||||
'conversions' => $conversions->toArray(),
|
'conversions' => $conversions->toArray(),
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in New Issue