diff --git a/README.md b/README.md index 1032cb817..c3c8c718e 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ We highly appreciate you sending us a postcard from your hometown, mentioning wh ## Documentation -You'll find the documentation on [https://spatie.be/docs/laravel-medialibrary](https://spatie.be/docs/laravel-medialibrary/v10). +You'll find the documentation on [https://spatie.be/docs/laravel-medialibrary](https://spatie.be/docs/laravel-medialibrary/v11). Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the media library? Feel free to [create an issue on GitHub](https://github.com/spatie/laravel-medialibrary/issues), we'll try to address it as soon as possible. diff --git a/docs/advanced-usage/attaching-media-in-mails.md b/docs/advanced-usage/attaching-media-in-mails.md index ffa225fe2..75155fe1a 100644 --- a/docs/advanced-usage/attaching-media-in-mails.md +++ b/docs/advanced-usage/attaching-media-in-mails.md @@ -3,7 +3,7 @@ title: Attaching media in mails weight: 9 --- -Laravel allows [to attach all sorts of classes](https://laravel.com/docs/9.x/mail#attachable-objects) in mails. The `Media` model implements Laravel's `Attachable` interface, so you can attach `Media` models directly in mails. +Laravel allows [to attach all sorts of classes](https://laravel.com/docs/10.x/mail#attachable-objects) in mails. The `Media` model implements Laravel's `Attachable` interface, so you can attach `Media` models directly in mails. ```php @@ -67,6 +67,6 @@ class BlogPostThumbnailMail extends Mailable ## Customizing the attachment -By default, the attachment will use the `file_name` and `mime_type` properties to configure Laravel's `Attachment` class. To override how `Attachments` are made, [use a custom media model](https://spatie.be/docs/laravel-medialibrary/v10/advanced-usage/using-your-own-model), and override the `toMailAttachment` method. +By default, the attachment will use the `file_name` and `mime_type` properties to configure Laravel's `Attachment` class. To override how `Attachments` are made, [use a custom media model](/docs/laravel-medialibrary/v11/advanced-usage/using-your-own-model), and override the `toMailAttachment` method. diff --git a/docs/advanced-usage/customising-database-connections.md b/docs/advanced-usage/customising-database-connections.md index 69a68602d..bdc957ea0 100644 --- a/docs/advanced-usage/customising-database-connections.md +++ b/docs/advanced-usage/customising-database-connections.md @@ -7,7 +7,7 @@ weight: 13 The built-in model (`Spatie\MediaLibrary\MediaCollections\Models\Media`) will use the default database connection set for your application. -If you need to change this database connection, you can create a custom model and set the `$connection` property (https://laravel.com/docs/9.x/eloquent#database-connections). See Using your own model for more information. +If you need to change this database connection, you can create a custom model and set the `$connection` property (https://laravel.com/docs/10.x/eloquent#database-connections). See Using your own model for more information. ```php toMediaCollection(); ``` -If you need to customise the database connection further before fetching or adding media, use you can do `$model->setConnection('landlord')`. \ No newline at end of file +If you need to customise the database connection further before fetching or adding media, use you can do `$model->setConnection('landlord')`. diff --git a/docs/advanced-usage/working-with-multiple-filesystems.md b/docs/advanced-usage/working-with-multiple-filesystems.md index 7e42737b3..5a66bd14a 100644 --- a/docs/advanced-usage/working-with-multiple-filesystems.md +++ b/docs/advanced-usage/working-with-multiple-filesystems.md @@ -5,7 +5,7 @@ weight: 1 By default, all files are stored on the disk specified as the `disk_name` in the config file. -Files can also be stored [on any filesystem that is configured in your Laravel app](http://laravel.com/docs/9.x/filesystem#configuration). When adding a file to the media library you can choose on which disk the file should be stored. This is useful when you have a combination of small files that should be stored locally and big files that you want to save on S3. +Files can also be stored [on any filesystem that is configured in your Laravel app](http://laravel.com/docs/10.x/filesystem#configuration). When adding a file to the media library you can choose on which disk the file should be stored. This is useful when you have a combination of small files that should be stored locally and big files that you want to save on S3. `toMediaCollection` accepts a disk name as a second parameter: @@ -16,7 +16,7 @@ $yourModel->addMedia($pathToAFile)->toMediaCollection('images', 's3'); ## Storing conversions on a separate disk -You can let the media library store [your conversions](https://spatie.be/docs/laravel-medialibrary/v10/converting-images/defining-conversions) and [responsive images](https://spatie.be/docs/laravel-medialibrary/v10/responsive-images/getting-started-with-responsive-images) on a disk other than the one where you save the original item. Pass the name of the disk where you want conversion to be saved to the `storingConversionsOnDisk` method. +You can let the media library store [your conversions](/docs/laravel-medialibrary/v11/converting-images/defining-conversions) and [responsive images](/docs/laravel-medialibrary/v11/responsive-images/getting-started-with-responsive-images) on a disk other than the one where you save the original item. Pass the name of the disk where you want conversion to be saved to the `storingConversionsOnDisk` method. Here's an example where the original file is saved on the local disk and the conversions on S3. diff --git a/docs/api/defining-conversions.md b/docs/api/defining-conversions.md index ef4f92a27..d1d142f83 100644 --- a/docs/api/defining-conversions.md +++ b/docs/api/defining-conversions.md @@ -5,7 +5,7 @@ weight: 2 A media conversion can be added to your model in the `registerMediaConversions`-function. It should start with a call to `addMediaConversion`. From there on you can use any of the methods available in the API. They are all chainable. -Take a look in the [Defining conversions section](/laravel-medialibrary/v10/converting-images/defining-conversions/) +Take a look in the [Defining conversions section](/docs/laravel-medialibrary/v11/converting-images/defining-conversions/) for more details. ## General methods @@ -56,5 +56,5 @@ You can learn more on native lazy loading [in this post on css-tricks](https://c ## Image manipulations -You may add any call to one of [the manipulation functions](https://docs.spatie.be/image) available on [the spatie/image package](https://github.com/spatie/image). +You may add any call to one of [the manipulation functions](https://spatie.be/docs/image) available on [the spatie/image package](https://github.com/spatie/image). diff --git a/docs/converting-images/defining-conversions.md b/docs/converting-images/defining-conversions.md index 9e1f42e37..a19ca0c54 100644 --- a/docs/converting-images/defining-conversions.md +++ b/docs/converting-images/defining-conversions.md @@ -7,9 +7,9 @@ When adding files to the media library it can automatically create derived versi Media conversions will be executed whenever a `jpg`, `png`, `svg`, `webp`, `avif`, `pdf`, `mp4 `, `mov` or `webm` file is added to the media library. By default, the conversions will be saved as a `jpg` files. This can be overwritten using the `format()` or `keepOriginalImageFormat()` methods. -Internally, [spatie/image](https://docs.spatie.be/image/v1/) is used to manipulate the images. You can use [any manipulation function](https://docs.spatie.be/image) from that package. +Internally, [spatie/image](https://spatie.be/docs/image/v1) is used to manipulate the images. You can use [any manipulation function](https://spatie.be/docs/image) from that package. -Please check [the image generator docs](/laravel-medialibrary/v10/converting-other-file-types/using-image-generators) for additional installation requirements when working with PDF, SVG or video formats. +Please check [the image generator docs](/docs/laravel-medialibrary/v11/converting-other-file-types/using-image-generators) for additional installation requirements when working with PDF, SVG or video formats. ## Are you a visual learner? @@ -94,7 +94,7 @@ $media->getUrl('old-picture') // the url to the sepia, bordered version ## Performing conversions on specific collections -By default a conversion will be performed on all files regardless of which [collection](/laravel-medialibrary/v10/working-with-media-collections/simple-media-collections) is used. Conversions can also be performed on specific collections by adding a call to `performOnCollections`. +By default a conversion will be performed on all files regardless of which [collection](/docs/laravel-medialibrary/v11/working-with-media-collections/simple-media-collections) is used. Conversions can also be performed on specific collections by adding a call to `performOnCollections`. This is how that looks like in the model: @@ -122,7 +122,7 @@ $media->getUrl('thumb') // returns '' ## Queuing conversions -By default, a conversion will be added to the connection and queue that you've [specified in the configuration](/laravel-medialibrary/v10/installation-setup). If you want your image to be created directly (and not on a queue) use `nonQueued` on a conversion. +By default, a conversion will be added to the connection and queue that you've [specified in the configuration](/docs/laravel-medialibrary/v11/installation-setup). If you want your image to be created directly (and not on a queue) use `nonQueued` on a conversion. ```php // in your model diff --git a/docs/converting-images/optimizing-converted-images.md b/docs/converting-images/optimizing-converted-images.md index a44180181..50f1ddf5e 100644 --- a/docs/converting-images/optimizing-converted-images.md +++ b/docs/converting-images/optimizing-converted-images.md @@ -27,7 +27,7 @@ The package will use these optimizers if they are present on your system: - [Gifsicle](http://www.lcdf.org/gifsicle/) - [Avifenc](https://github.com/AOMediaCodec/libavif/blob/main/doc/avifenc.1.md) -Head over to [the installation page](https://docs.spatie.be/laravel-medialibrary/v10/installation-setup#optimization-tools) to learn how to install these. +Head over to [the installation page](https://spatie.be/docs/laravel-medialibrary/v11/installation-setup#content-setting-up-optimization-tools) to learn how to install these. ## Are you a visual learner? diff --git a/docs/converting-other-file-types/using-image-generators.md b/docs/converting-other-file-types/using-image-generators.md index 963f39627..5c0f8efae 100644 --- a/docs/converting-other-file-types/using-image-generators.md +++ b/docs/converting-other-file-types/using-image-generators.md @@ -16,9 +16,9 @@ $this->addMediaConversion('thumb') The media library includes image generators for the following file types: -- [PDF](/laravel-medialibrary/v10/converting-other-file-types/using-image-generators#pdf) -- [SVG](/laravel-medialibrary/v10/converting-other-file-types/using-image-generators#svg) -- [Video](/laravel-medialibrary/v10/converting-other-file-types/using-image-generators#video) +- [PDF](/docs/laravel-medialibrary/v11/converting-other-file-types/using-image-generators#pdf) +- [SVG](/docs/laravel-medialibrary/v11/converting-other-file-types/using-image-generators#svg) +- [Video](/docs/laravel-medialibrary/v11/converting-other-file-types/using-image-generators#video) ## PDF diff --git a/docs/handling-uploads-with-media-library-pro/customizing-css.md b/docs/handling-uploads-with-media-library-pro/customizing-css.md index a0f2a80c5..c95957244 100644 --- a/docs/handling-uploads-with-media-library-pro/customizing-css.md +++ b/docs/handling-uploads-with-media-library-pro/customizing-css.md @@ -93,7 +93,7 @@ mix.purgeCss({ whitelistPatterns: [/^media-library/] }); The components have three major sections that are rendered in this order: the validation errors, the items and the uploader. -![Screenshot of component](/docs/laravel-medialibrary/v10/images/pro/sections.png) +![Screenshot of component](/docs/laravel-medialibrary/v11/images/pro/sections.png) You can change the order of these sections to be more consistent with your app, without having to create a custom component from scratch. @@ -108,4 +108,4 @@ Add the following lines to your CSS, and switch the order of the sections around } ``` -![Screenshot of component with sections in different order](/docs/laravel-medialibrary/v10/images/pro/sections-order-switched.png) +![Screenshot of component with sections in different order](/docs/laravel-medialibrary/v11/images/pro/sections-order-switched.png) diff --git a/docs/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-2.md b/docs/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-2.md index e1f6271a6..13cf2e65a 100644 --- a/docs/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-2.md +++ b/docs/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-2.md @@ -29,7 +29,7 @@ If you are having troubles using the components, take a look in that app to see You can use `x-media-library-attachment` component to upload a single file. -![Screenshot of the attachment component](/docs/laravel-medialibrary/v10/images/pro/attachment.png) +![Screenshot of the attachment component](/docs/laravel-medialibrary/v11/images/pro/attachment.png) Here's how that might look like in the view of your Livewire component: @@ -141,7 +141,7 @@ Uploading multiple files is very similar to uploading a single file. The only th ``` -![Screenshot of the attachment component](/docs/laravel-medialibrary/v10/images/pro/multiple.png) +![Screenshot of the attachment component](/docs/laravel-medialibrary/v11/images/pro/multiple.png) In your Livewire component you must: - use the `Spatie\MediaLibraryPro\Http\Livewire\Concerns\WithMedia` trait @@ -222,7 +222,7 @@ You can manage the entire contents of a media library collection with `x-media-l component is intended for use in admin sections. Here is an example where we are going to administer an `images` collection of a `$blogPost` model. We assume that you -already [prepared the model](/docs/laravel-medialibrary/v10/basic-usage/preparing-your-model) to handle uploads. +already [prepared the model](/docs/laravel-medialibrary/v11/basic-usage/preparing-your-model) to handle uploads. ```html
@@ -310,7 +310,7 @@ public function submit() ### Using custom properties -Media library supports [custom properties](/docs/laravel-medialibrary/v10/advanced-usage/using-custom-properties) to be saved on a media item. By +Media library supports [custom properties](/docs/laravel-medialibrary/v11/advanced-usage/using-custom-properties) to be saved on a media item. By default, the `x-media-library-collection` component doesn't show the custom properties. To add them you should create a blade view that will be used to display all form elements on a row in the component. @@ -348,7 +348,7 @@ You should then pass the path to that view to the `fields-view` prop of the `x-m This is how that will look like. -![Screenshot of custom property](/docs/laravel-medialibrary/v10/images/pro/extra.png) +![Screenshot of custom property](/docs/laravel-medialibrary/v11/images/pro/extra.png) In your Livewire component, you can validate the custom properties like this. This example assumes that you have set the `name` attribute of `x-media-library-collection` to `images`. diff --git a/docs/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-3.md b/docs/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-3.md index 5a673794d..ffce46948 100644 --- a/docs/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-3.md +++ b/docs/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-3.md @@ -23,7 +23,7 @@ If you are having trouble using the components, take a look in that app to see h You can use `livewire:media-library` component to upload a single file. -![Screenshot of the attachment component](/docs/laravel-medialibrary/v10/images/pro/attachment.png) +![Screenshot of the attachment component](/docs/laravel-medialibrary/v11/images/pro/attachment.png) Here's how that might look like in the view of your Livewire component: @@ -127,7 +127,7 @@ Uploading multiple files is very similar to uploading a single file. The only th
``` -![Screenshot of the attachment component](/docs/laravel-medialibrary/v10/images/pro/multiple.png) +![Screenshot of the attachment component](/docs/laravel-medialibrary/v11/images/pro/multiple.png) In your Livewire component you must: - use the `Spatie\MediaLibraryPro\Livewire\Concerns\WithMedia` trait @@ -206,7 +206,7 @@ You can manage the entire contents of a media library collection with `livewire: component is intended for use in admin sections. Here is an example where we are going to administer an `images` collection of a `$blogPost` model. We assume that you -already [prepared the model](/docs/laravel-medialibrary/v10/basic-usage/preparing-your-model) to handle uploads. +already [prepared the model](/docs/laravel-medialibrary/v11/basic-usage/preparing-your-model) to handle uploads. ```html
@@ -297,7 +297,7 @@ public function submit() ### Using custom properties -Media library supports [custom properties](/docs/laravel-medialibrary/v10/advanced-usage/using-custom-properties) to be saved on a media item. By +Media library supports [custom properties](/docs/laravel-medialibrary/v11/advanced-usage/using-custom-properties) to be saved on a media item. By default, the `livewire:media-library` component doesn't show the custom properties. To add them you should create a blade view that will be used to display all form elements on a row in the component. @@ -335,7 +335,7 @@ You should then pass the path to that view to the `fields-view` prop of the `liv This is how that will look like. -![Screenshot of custom property](/docs/laravel-medialibrary/v10/images/pro/extra.png) +![Screenshot of custom property](/docs/laravel-medialibrary/v11/images/pro/extra.png) In your Livewire component, you can validate the custom properties like this. This example assumes that you have set the `name` attribute of `livewire:media-library` to `images`. diff --git a/docs/handling-uploads-with-media-library-pro/handling-uploads-with-react.md b/docs/handling-uploads-with-media-library-pro/handling-uploads-with-react.md index d0db6844b..b3da80e60 100644 --- a/docs/handling-uploads-with-media-library-pro/handling-uploads-with-react.md +++ b/docs/handling-uploads-with-media-library-pro/handling-uploads-with-react.md @@ -7,11 +7,11 @@ Media Library Pro provides beautiful UI components for React. They pack a lot of The `MediaLibraryAttachment` component can upload one or more files with little or no extra information. The attachment component is a lightweight solution for small bits of UI like avatar fields. -![Screenshot of the MediaLibraryAttachment React component](/docs/laravel-medialibrary/v10/images/pro/attachment.png) +![Screenshot of the MediaLibraryAttachment React component](/docs/laravel-medialibrary/v11/images/pro/attachment.png) The `MediaLibraryCollection` component can upload multiple files with custom properties. The collection component shines when you need to manage media, like in backoffices. -![Screenshot of the MediaLibraryCollection React component](/docs/laravel-medialibrary/v10/images/pro/collection.png) +![Screenshot of the MediaLibraryCollection React component](/docs/laravel-medialibrary/v11/images/pro/collection.png) If neither of these fit the bill, we've exposed a set of APIs for you to be bold and [roll your own components](./creating-custom-react-components). @@ -206,7 +206,7 @@ function AvatarComponent() { ### Using custom properties -The Media Library supports [custom properties](/docs/laravel-medialibrary/v10/advanced-usage/using-custom-properties) to be saved on a media item. The values for these can be chosen by your users. By default, the `MediaLibraryAttachment` component doesn't show any input fields, and the `MediaLibraryCollection` component only shows a `name` field, with the option to add more fields. +The Media Library supports [custom properties](/docs/laravel-medialibrary/v11/advanced-usage/using-custom-properties) to be saved on a media item. The values for these can be chosen by your users. By default, the `MediaLibraryAttachment` component doesn't show any input fields, and the `MediaLibraryCollection` component only shows a `name` field, with the option to add more fields. Use the `fieldsView` render prop to add some fields: @@ -255,7 +255,7 @@ Use the `fieldsView` render prop to add some fields: When you add an image to your collection, it will look like this. -![Screenshot of custom property](/docs/laravel-medialibrary/v10/images/pro/extra.png) +![Screenshot of custom property](/docs/laravel-medialibrary/v11/images/pro/extra.png) ### Customizing the file properties diff --git a/docs/handling-uploads-with-media-library-pro/handling-uploads-with-vue.md b/docs/handling-uploads-with-media-library-pro/handling-uploads-with-vue.md index 34c045b99..d6d3f13dd 100644 --- a/docs/handling-uploads-with-media-library-pro/handling-uploads-with-vue.md +++ b/docs/handling-uploads-with-media-library-pro/handling-uploads-with-vue.md @@ -7,11 +7,11 @@ Media Library Pro provides beautiful UI components for Vue 2 and Vue 3. They pac The `MediaLibraryAttachment` component can upload one or more files with little or no extra information. The attachment component is a lightweight solution for small bits of UI like avatar fields. -![Screenshot of the MediaLibraryAttachment Vue component](/docs/laravel-medialibrary/v10/images/pro/attachment.png) +![Screenshot of the MediaLibraryAttachment Vue component](/docs/laravel-medialibrary/v11/images/pro/attachment.png) The `MediaLibraryCollection` component can upload multiple files with custom properties. The collection component shines when you need to manage media, like in backoffices. -![Screenshot of the MediaLibraryCollection Vue component](/docs/laravel-medialibrary/v10/images/pro/collection.png) +![Screenshot of the MediaLibraryCollection Vue component](/docs/laravel-medialibrary/v11/images/pro/collection.png) If neither of these fit the bill, we've exposed a set of APIs for you to be bold and [roll your own components](./creating-custom-vue-components). @@ -358,7 +358,7 @@ The components keep track of whether they're ready to be submitted, you can use ### Using custom properties -The Media Library supports [custom properties](/docs/laravel-medialibrary/v10/advanced-usage/using-custom-properties) to be saved on a media item. The values for these can be chosen by your users. By default, the `MediaLibraryAttachment` component doesn't show any input fields, and the `MediaLibraryCollection` component only shows a `name` field, with the option to add more fields. +The Media Library supports [custom properties](/docs/laravel-medialibrary/v11/advanced-usage/using-custom-properties) to be saved on a media item. The values for these can be chosen by your users. By default, the `MediaLibraryAttachment` component doesn't show any input fields, and the `MediaLibraryCollection` component only shows a `name` field, with the option to add more fields. Use the `fields` scoped slot to add some fields: @@ -435,7 +435,7 @@ Use the `fields` scoped slot to add some fields: When you add an image to your collection, it will look like this. -![Screenshot of custom property](/docs/laravel-medialibrary/v10/images/pro/extra.png) +![Screenshot of custom property](/docs/laravel-medialibrary/v11/images/pro/extra.png) ### Customizing the file properties diff --git a/docs/handling-uploads-with-media-library-pro/installation.md b/docs/handling-uploads-with-media-library-pro/installation.md index 01eaa42a7..6e01778e4 100644 --- a/docs/handling-uploads-with-media-library-pro/installation.md +++ b/docs/handling-uploads-with-media-library-pro/installation.md @@ -3,7 +3,7 @@ title: Installation weight: 2 --- -[Media Library Pro](medialibrary.pro) is a paid add-on package for Laravel Media Library. In order to use it, you must have the base version of media library installed in your project. Here are [the installation instructions for the base version](/docs/laravel-medialibrary/v10/installation-setup). +[Media Library Pro](medialibrary.pro) is a paid add-on package for Laravel Media Library. In order to use it, you must have the base version of media library installed in your project. Here are [the installation instructions for the base version](/docs/laravel-medialibrary/v11/installation-setup). ## Installing the base package @@ -17,7 +17,7 @@ Single application licenses maybe installed in a single Laravel app. In case you The current version of Media Library Pro is v3. -You will find upgrade instructions [here](/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/upgrading). +You will find upgrade instructions [here](/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/upgrading). ## Requiring Media Library Pro @@ -70,7 +70,7 @@ If you are using [Laravel Forge](https://forge.laravel.com), you don't need to c - Username: Fill this field with your spatie.be account email address - Password: Fill this field with your Media Library Pro license key -![screenshot](/docs/laravel-medialibrary/v10/images/forge.png) +![screenshot](/docs/laravel-medialibrary/v11/images/forge.png) With the configuration above in place, you'll be able to install the Media Library Pro into your project using this command: @@ -217,7 +217,7 @@ mix.purgeCss({ whitelistPatterns: [/^media-library/] }); You should copy the built CSS from `vendor/spatie/laravel-medialibrary-pro/resources/js/media-library-pro-styles/dist/styles.css` into your `public` folder, and then use a `link` tag in your blade/html to get it: ``. -If you would like to customize the CSS we provide, head over to [the section on Customizing CSS](/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/customizing-css). +If you would like to customize the CSS we provide, head over to [the section on Customizing CSS](/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/customizing-css). ## Usage in a frontend repository diff --git a/docs/handling-uploads-with-media-library-pro/introduction.md b/docs/handling-uploads-with-media-library-pro/introduction.md index 6f54b5d4a..b727758a5 100644 --- a/docs/handling-uploads-with-media-library-pro/introduction.md +++ b/docs/handling-uploads-with-media-library-pro/introduction.md @@ -9,11 +9,11 @@ Media Library Pro ships with two components for every environment: an attachment The attachment component can upload one or more files with little or no extra information. It's a lightweight solution for small bits of UI like avatar fields or message attachments. -![Screenshot of the attachment component](/docs/laravel-medialibrary/v10/images/pro/attachment.png) +![Screenshot of the attachment component](/docs/laravel-medialibrary/v11/images/pro/attachment.png) The collection component can upload multiple files with custom properties. The collection component shines when you need to manage media, for example in admin panels. -![Screenshot of the attachment component](/docs/laravel-medialibrary/v10/images/pro/collection.png) +![Screenshot of the attachment component](/docs/laravel-medialibrary/v11/images/pro/collection.png) If none of those fit the bill, Media Library Pro supplies you with a number of helpers to build your own components. @@ -29,19 +29,19 @@ Want to see more videos like this? Check out our [free video course on how to us All components upload media to the server with the same API. Before you dive into the frontend, read [our server guide](processing-uploads-on-the-server). -Next, choose your own journey. We have written extensive guides for all four flavours. Be sure to first follow [the base installation instructions](/docs/laravel-medialibrary/v10/installation-setup) and [pro installation instructions](/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/installation). +Next, choose your own journey. We have written extensive guides for all four flavours. Be sure to first follow [the base installation instructions](/docs/laravel-medialibrary/v11/installation-setup) and [pro installation instructions](/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/installation). ### Blade You can use the attachment and collection components in regular forms. Behind the scenes these components use Livewire, but no Livewire knowledge is needed to use them. - -- [Handling uploads with Blade](/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/handling-uploads-with-blade) +See the links below for handling uploads with Livewire. ### Livewire If you are creating Livewire components to display and handle forms, this is your path. The attachment and collection components can be used from within your Livewire components -- [Handling uploads with Livewire](/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/handling-uploads-with-livewire) +- [Handling uploads with Livewire 2](/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-2) +- [Handling uploads with Livewire 3](/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/handling-uploads-with-livewire-3) ### Vue @@ -57,4 +57,4 @@ If you are creating Livewire components to display and handle forms, this is you We've created a demo application in which all components are installed. This way you'll have a full example on how to use components in your project. -You'll find the code of the demo application in [this repository on GitHub](https://github.com/spatie/laravel-medialibrary-pro-app). In order to `composer install` on that project, you'll need to have [a license](/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/installation#getting-a-license). +You'll find the code of the demo application in [this repository on GitHub](https://github.com/spatie/laravel-medialibrary-pro-app). In order to `composer install` on that project, you'll need to have [a license]([/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/installation#content-getting-a-license). diff --git a/docs/handling-uploads-with-media-library-pro/processing-uploads-on-the-server.md b/docs/handling-uploads-with-media-library-pro/processing-uploads-on-the-server.md index 3e2cff83e..93d0d27c7 100644 --- a/docs/handling-uploads-with-media-library-pro/processing-uploads-on-the-server.md +++ b/docs/handling-uploads-with-media-library-pro/processing-uploads-on-the-server.md @@ -233,7 +233,7 @@ These rules can be used on `validateMultipleMedia`; ### Validating attributes and custom properties -If you're [using custom properties](/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/handling-uploads-with-blade#using-custom-properties), you can validate them with the `customProperty` function. The first argument should be the name of the custom property you are validating. The second argument should be a string or an array with rules you'd like to use. +If you're [using custom properties](/docs/laravel-medialibrary/v11/advanced-usage/using-custom-properties), you can validate them with the `customProperty` function. The first argument should be the name of the custom property you are validating. The second argument should be a string or an array with rules you'd like to use. Here's an example where we validate `extra_property` and `another_extra_property`. @@ -259,7 +259,7 @@ class StoreLivewireCollectionCustomPropertyRequest extends FormRequest ## Processing requests -After you've validated the request, you should persist the changes to the media library. The media library provides two methods for that: `syncFromMediaLibraryRequest` and `addFromMediaLibraryRequest`. Both these methods are available on all [models that handle media](/docs/laravel-medialibrary/v10/basic-usage/preparing-your-model). Either way call the method `toMediaCollection` to update your media-model in the database. This will also ensure that temporary uploads are converted to the appropriate model. +After you've validated the request, you should persist the changes to the media library. The media library provides two methods for that: `syncFromMediaLibraryRequest` and `addFromMediaLibraryRequest`. Both these methods are available on all [models that handle media](/docs/laravel-medialibrary/v11/basic-usage/preparing-your-model). Either way call the method `toMediaCollection` to update your media-model in the database. This will also ensure that temporary uploads are converted to the appropriate model. ### `addFromMediaLibraryRequest` diff --git a/docs/installation-setup.md b/docs/installation-setup.md index 15329a22c..9e3e7546a 100644 --- a/docs/installation-setup.md +++ b/docs/installation-setup.md @@ -8,10 +8,10 @@ Media Library can be installed via Composer: If you only use the base package issue this command: ```bash -composer require "spatie/laravel-medialibrary:^10.0.0" +composer require "spatie/laravel-medialibrary:^11.0.0" ``` -If you have a license for Media Library Pro, you should install `spatie/laravel-media-library-pro` instead. Please refer to our [Media Library Pro installation instructions](https://spatie.be/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/installation) to continue. +If you have a license for Media Library Pro, you should install `spatie/laravel-media-library-pro` instead. Please refer to our [Media Library Pro installation instructions](https://spatie.be/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/installation) to continue. ## Preparing the database @@ -227,7 +227,7 @@ return [ * images. By default we optimize for filesize and create variations that each are 20% * smaller than the previous one. More info in the documentation. * - * https://docs.spatie.be/laravel-medialibrary/v10/advanced-usage/generating-responsive-images + * https://spatie.be/docs/laravel-medialibrary/v11/responsive-images/getting-started-with-responsive-images */ 'width_calculator' => Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class, @@ -309,7 +309,7 @@ If you are planning on working with image manipulations it's recommended to conf ### Setting up optimization tools -Media library will use these tools to [optimize converted images](https://docs.spatie.be/laravel-medialibrary/v10/converting-images/optimizing-converted-images) if they are present on your system: +Media library will use these tools to [optimize converted images](https://spatie.be/docs/laravel-medialibrary/v11/converting-images/optimizing-converted-images) if they are present on your system: - [JpegOptim](http://freecode.com/projects/jpegoptim) - [Optipng](http://optipng.sourceforge.net/) @@ -345,8 +345,8 @@ brew install libavif ## Installing Media Library Pro -[Media Library Pro](http://medialibrary.pro) is an optional add-on package that offers Blade, Vue, and React components to upload files to your application. It [integrates](https://spatie.be/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/introduction) beautifully with the laravel-medialibrary. +[Media Library Pro](http://medialibrary.pro) is an optional add-on package that offers Blade, Vue, and React components to upload files to your application. It [integrates](https://spatie.be/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/introduction) beautifully with the laravel-medialibrary. You can buy a license for Media Library Pro on [the product page](https://spatie.be/products/media-library-pro) at spatie.be. -To install Media Library Pro, you should follow [these instructions](https://spatie.be/docs/laravel-medialibrary/v10/handling-uploads-with-media-library-pro/installation). +To install Media Library Pro, you should follow [these instructions](https://spatie.be/docs/laravel-medialibrary/v11/handling-uploads-with-media-library-pro/installation). diff --git a/docs/introduction.md b/docs/introduction.md index 848f01551..2379e53d0 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -25,9 +25,9 @@ $yourModel->addMedia($smallFile)->toMediaCollection('downloads', 'local'); $yourModel->addMedia($bigFile)->toMediaCollection('downloads', 's3'); ``` -The storage of the files is handled by [Laravel's Filesystem](https://laravel.com/docs/9.x/filesystem), so you can plug in any compatible filesystem. +The storage of the files is handled by [Laravel's Filesystem](https://laravel.com/docs/10.x/filesystem), so you can plug in any compatible filesystem. -The package can also generate derived images such as thumbnails for images, videos and PDFs. Once you've [set up your model](/laravel-medialibrary/v10/basic-usage/preparing-your-model), they're easily accessible: +The package can also generate derived images such as thumbnails for images, videos and PDFs. Once you've [set up your model](/docs/laravel-medialibrary/v11/basic-usage/preparing-your-model), they're easily accessible: ```php $yourModel->getMedia('images')->first()->getUrl('thumb'); @@ -37,7 +37,7 @@ $yourModel->getMedia('images')->first()->getUrl('thumb'); We've recorded [a video course](https://spatie.be/courses/discovering-laravel-media-library) on how to use this package. It's the best way to get started using media library -[![video course](/docs/laravel-medialibrary/v10/images/video-course.jpg)](https://spatie.be/courses/discovering-laravel-media-library/introducing-laravel-media-library) +[![video course](/docs/laravel-medialibrary/v11/images/video-course.jpg)](https://spatie.be/courses/discovering-laravel-media-library/introducing-laravel-media-library) ## We have badges! diff --git a/docs/responsive-images/demo.md b/docs/responsive-images/demo.md index 59369bc86..eb0580a49 100644 --- a/docs/responsive-images/demo.md +++ b/docs/responsive-images/demo.md @@ -19,7 +19,7 @@ weight: 5

- The example above demonstrates the responsive images technique used in the Laravel MediaLibrary. + The example above demonstrates the responsive images technique used in the Laravel MediaLibrary.

Try this: