{"id":19258924,"url":"https://github.com/lassehaslev/laravel-image","last_synced_at":"2026-06-10T20:31:20.240Z","repository":{"id":57012589,"uuid":"75715523","full_name":"LasseHaslev/laravel-image","owner":"LasseHaslev","description":"Basic image handeling. Upload, Store in databse, get path, etc.","archived":false,"fork":false,"pushed_at":"2018-03-10T11:46:20.000Z","size":79,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T09:29:05.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LasseHaslev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-06T09:24:22.000Z","updated_at":"2023-03-05T01:46:03.000Z","dependencies_parsed_at":"2022-08-21T15:10:24.932Z","dependency_job_id":null,"html_url":"https://github.com/LasseHaslev/laravel-image","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Flaravel-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Flaravel-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Flaravel-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Flaravel-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LasseHaslev","download_url":"https://codeload.github.com/LasseHaslev/laravel-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240356192,"owners_count":19788513,"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":[],"created_at":"2024-11-09T19:14:49.042Z","updated_at":"2026-06-10T20:31:20.198Z","avatar_url":"https://github.com/LasseHaslev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lassehaslev/laravel-image\n\u003e Basic image handeling. Upload, Store in databse, get path, etc.\n\n## Install\nRun ```composer require lassehaslev/laravel-image```\n\nCreate your package and add the following line to ```providers``` in ```config/app.php``` \n```\nLasseHaslev\\LaravelImage\\Providers\\ServiceProvider::class,\n```\n\n## Usage\n#### Run migrations\n```bash\nphp artisan migrate\n```\n\n#### Config\n```php\n\u003c?php\nreturn [\n    'owner'=\u003enull, // Set to set a owner object f.eks. 'App\\User' \n    'folder'=\u003e'uploads/images', // Folder to upload to\n    'routes'=\u003e'/', // Route group name. To prevent setting routes set null\n];\n```\n\nIts recomended that you overwrite ```images::index``` view.\nTo do this add the following to ```resources/views/vendor/images/index.blade.php```\n```php\n@extends( 'backend' )\n\n@section( 'content' )\n\n@include( 'images::elements.Upload' )\n@include( 'images::elements.List' )\n\n@endsection\n```\nYou can also do the same for ```images::elements.Upload``` and ```images::elements.List```.\n\n#### Api\n```php\n// Upload new image\n$image = Image::upload( UploadedFile $file );\n\n// Get relative path\necho $image-\u003epath;\n\n// Get full path\necho $image-\u003epath();\n\n// Get url\necho $image-\u003eurl();\n\n// Delete\n$image-\u003edelete();\n\n// Update/Change image content\n$image-\u003euploadImage( UploadedFile $file );\n```\n\n## Development\n``` bash\n# Install dependencies\ncomposer install\n\n# Install dependencies for automatic tests\nyarn\n\n# Run one time\nnpm run test\n\n# Automaticly run test on changes\nnpm run dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flassehaslev%2Flaravel-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flassehaslev%2Flaravel-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flassehaslev%2Flaravel-image/lists"}