{"id":19527037,"url":"https://github.com/kazemmdev/media","last_synced_at":"2025-04-26T10:31:36.774Z","repository":{"id":57003718,"uuid":"446481452","full_name":"kazemmdev/media","owner":"kazemmdev","description":"Associate files with Eloquent models","archived":false,"fork":false,"pushed_at":"2022-01-12T10:38:57.000Z","size":52,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T13:35:13.423Z","etag":null,"topics":["audio","eloquent","images","laravel","media","php","upload","video"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kazemmdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-10T15:38:17.000Z","updated_at":"2024-09-09T06:56:51.000Z","dependencies_parsed_at":"2022-08-21T12:10:51.856Z","dependency_job_id":null,"html_url":"https://github.com/kazemmdev/media","commit_stats":null,"previous_names":["kazemmdev/media"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazemmdev%2Fmedia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazemmdev%2Fmedia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazemmdev%2Fmedia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazemmdev%2Fmedia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazemmdev","download_url":"https://codeload.github.com/kazemmdev/media/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250972894,"owners_count":21516440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","eloquent","images","laravel","media","php","upload","video"],"created_at":"2024-11-11T01:13:22.929Z","updated_at":"2025-04-26T10:31:36.128Z","avatar_url":"https://github.com/kazemmdev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Associate files with Eloquent models\n\n[![Latest Version](https://img.shields.io/github/release/k90mirzaei/media.svg?style=flat-square)](https://github.com/k90mirzaei/media/releases)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/k90mirzaei/media/run-tests?label=tests)\n[![Total Downloads](https://img.shields.io/packagist/dt/k90mirzaei/media.svg?style=flat-square)](https://packagist.org/packages/k90mirzaei/media)\n\nThis package can associate all sorts of files with Eloquent models. It provides a\nsimple API to work with.\n\nHere are a few short examples of what you can do:\n\n```php\n$newsItem = News::find(1);\n$newsItem-\u003eaddMedia($pathToFile)-\u003etoMediaCollection('images');\n```\n\nIt can handle your uploads directly:\n\n```php\n$newsItem-\u003eaddMedia($request-\u003efile('image'))-\u003etoMediaCollection('images');\n```\n\nWant to store some large files on another filesystem? No problem:\n\n```php\n$newsItem-\u003eaddMedia($smallFile)-\u003etoMediaCollection('downloads', 'local');\n$newsItem-\u003eaddMedia($bigFile)-\u003etoMediaCollection('downloads', 's3');\n```\n\nThe storage of the files is handled by [Laravel's Filesystem](https://laravel.com/docs/filesystem),\nso you can use any filesystem you like. Additionally the package can create image manipulations\non images, audios and videos.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n\n## Testing\n\nYou can run the tests with:\n\n```bash\nvendor/bin/phpunit\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazemmdev%2Fmedia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazemmdev%2Fmedia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazemmdev%2Fmedia/lists"}