spatie/laravel-medialibrary
Fork: 1030 Star: 5461 (更新于 1970-01-01 00:00:00)
license: MIT
Language: PHP .
Associate files with Eloquent models
最后发布版本: 10.15.0 ( 2023-11-03 21:09:40)
Associate files with Eloquent models
This package can associate all sorts of files with Eloquent models. It provides a simple API to work with. To learn all about it, head over to the extensive documentation.
Here are a few short examples of what you can do:
$newsItem = News::find(1);
$newsItem->addMedia($pathToFile)->toMediaCollection('images');
It can handle your uploads directly:
$newsItem->addMedia($request->file('image'))->toMediaCollection('images');
Want to store some large files on another filesystem? No problem:
$newsItem->addMedia($smallFile)->toMediaCollection('downloads', 'local');
$newsItem->addMedia($bigFile)->toMediaCollection('downloads', 's3');
The storage of the files is handled by Laravel's Filesystem, so you can use any filesystem you like. Additionally the package can create image manipulations on images and pdfs that have been added in the media library.
Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Documentation
You'll find the documentation on https://spatie.be/docs/laravel-medialibrary.
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, we'll try to address it as soon as possible.
If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker.
Testing
You can run the tests with:
./vendor/bin/pest
You can run the Github actions locally with act. You have to use a custom image for the ubuntu-latest platform to get PHP up and running properly. To run the tests locally, run:
act -P ubuntu-latest=shivammathur/node:latest
To run a specific workflow, for example run-tests.yml
run:
act -P ubuntu-latest=shivammathur/node:latest -j run-tests
Upgrading
Please see UPGRADING for details.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email security@spatie.be instead of using the issue tracker.
Credits
A big thank you to Nicolas Beauvais for helping out with the issues on this repo.
And a special thanks to Caneco for the logo ✨
Alternatives
License
The MIT License (MIT). Please see License File for more information.
最近版本更新:(数据更新于 1970-01-01 00:00:00)
2023-11-03 21:09:40 10.15.0
2023-10-25 19:27:16 10.14.0
2023-10-09 20:53:06 10.13.2
2023-10-09 15:18:59 10.13.1
2023-09-26 20:31:33 10.13.0
2023-09-05 15:56:32 10.12.2
2023-09-04 15:57:19 10.12.1
2023-09-04 15:52:24 10.12.0
2023-08-25 16:54:39 10.11.4
2023-08-07 18:43:36 10.11.3
主题(topics):
eloquent, hacktoberfest, images, laravel, media, php, upload
spatie/laravel-medialibrary同语言 PHP最近更新仓库
2024-11-01 18:37:36 schmittjoh/JMSSerializerBundle
2024-10-31 21:37:53 filamentphp/filament
2024-10-28 00:16:41 symfony/var-dumper
2024-10-28 00:11:41 symfony/symfony
2024-10-11 23:44:26 coollabsio/coolify
2024-10-11 03:27:29 odan/slim4-skeleton