{"id":36986073,"url":"https://github.com/skycoder026/laravel-filesaver","last_synced_at":"2026-01-13T23:04:01.313Z","repository":{"id":43030618,"uuid":"436318806","full_name":"skycoder026/laravel-filesaver","owner":"skycoder026","description":"Laravel Filesaver","archived":false,"fork":false,"pushed_at":"2022-12-03T18:03:17.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-31T02:35:07.090Z","etag":null,"topics":["fileupload","google-drive-fileupload","local-storage-fileupload"],"latest_commit_sha":null,"homepage":"","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/skycoder026.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":"2021-12-08T16:36:56.000Z","updated_at":"2023-01-24T09:23:54.000Z","dependencies_parsed_at":"2023-01-22T17:00:25.532Z","dependency_job_id":null,"html_url":"https://github.com/skycoder026/laravel-filesaver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skycoder026/laravel-filesaver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoder026%2Flaravel-filesaver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoder026%2Flaravel-filesaver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoder026%2Flaravel-filesaver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoder026%2Flaravel-filesaver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skycoder026","download_url":"https://codeload.github.com/skycoder026/laravel-filesaver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skycoder026%2Flaravel-filesaver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fileupload","google-drive-fileupload","local-storage-fileupload"],"created_at":"2026-01-13T23:04:00.740Z","updated_at":"2026-01-13T23:04:01.308Z","avatar_url":"https://github.com/skycoder026.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description [![Build Status](https://secure.travis-ci.org/jeresig/jquery.hotkeys.png)](http://travis-ci.org/jeresig/jquery.hotkeys)\n\n**Laravel Filesaver** is a media saver package, that can help you to stored any kind of media file. And it is very easy to use and install.\n\nThis is a small package to easy and simplify your code.\n\n**Speciality** it will automatically save file/image name with actual path into your database\n\n\n## Installation Process\n\n```bash\ncomposer require skycoder/laravel-filesaver\n```\n\n\n## Uses\nOpen your controller from where you want to store your media file and use this piece of line code into the method.\n\n```php\n  $fileSaver = new Filesaver();\n\n  $fileSaver-\u003eupload_file($request-\u003eform_variable, $modelName, 'database_fieldname', 'base-path');\n```\n\nor \n\n```php\n  (new Filesaver())-\u003eupload_file($request-\u003efile_variable, $modelName, 'database_fieldname', 'base-path');\n```\n\nIn both case you shoud import class `use Skycoder\\LaravelFilesaver\\Filesaver;` top of the class\n\n\n## Example Code\n```php\n\u003c?php\nnamespace App\\Http\\Controllers\\Setup;\n\nuse App\\Models\\User;\nuse Illuminate\\Http\\Request;\nuse App\\Http\\Controllers\\Controller;\nuse Skycoder\\LaravelFilesaver\\Filesaver;\n\nclass UserController extends Controller\n{\n    /*\n     |--------------------------------------------------------------------------\n     | STORE METHOD\n     |--------------------------------------------------------------------------\n    */\n    public function store(Request $request)\n    {\n        $user = User::create([\n            'name'  =\u003e $request-\u003ename,\n            'email' =\u003e $request-\u003eemail\n        ]);\n\n        (new Filesaver())-\u003eupload_file($request-\u003eimage, $user, 'profile-pic', 'user-profile-pic');\n        return $user-\u003erefresh();\n    }\n}\n```\n\n\n## Configuration for Google Drive\nFollow the link to get \u003ca href=\"https://github.com/ivanvermeyen/laravel-google-drive-demo#create-your-google-drive-api-keys\"\u003eGoogle Drive Credential\u003c/a\u003e if you don't have\nAfter that you should install a google drive package, \n\n`composer require nao-pon/flysystem-google-drive`\n\nIf need add `App\\Providers\\GoogleDriveServiceProvider::class,` to providers array into `config/app.php` \n \n And then add this array into `config/filesystems.php`\n ```php\n    'google' =\u003e [\n        'driver' =\u003e 'google',\n        'clientId' =\u003e env('GOOGLE_CLIENT_ID'),\n        'clientSecret' =\u003e env('GOOGLE_CLIENT_SECRET'),\n        'refreshToken' =\u003e env('GOOGLE_REFRESH_TOKEN'),\n        'folderId' =\u003e env('GOOGLE_DRIVE_FOLDER_ID'),\n    ],\n  ```\n  \n  And finally add your google drive credential into `.env` file\n  \n  ```env\nFILESYSTEM_CLOUD=google\nGOOGLE_CLIENT_ID=\"YOUR_GOOGLE_CLIENT_ID\"\nGOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET\"\nGOOGLE_REFRESH_TOKEN=\"YOUR_GOOGLE_REFRESH_TOKEN\"\nGOOGLE_DRIVE_FOLDER_ID=\"YOUR_GOOGLE_DRIVE_FOLDER_ID\"\n  ```\n\nAfter finish your setup you should add one line of code into your controller\n\n```php \n(new Filesaver())-\u003euploadFileToGoogleDrive($request-\u003eform_file_name, $modelName, 'database_file_name');\n```\n\n## More Packages\n\n- \u003ca href=\"https://github.com/skycoder026/user-log\" target=\"_blank\"\u003eUser Log\u003c/a\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskycoder026%2Flaravel-filesaver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskycoder026%2Flaravel-filesaver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskycoder026%2Flaravel-filesaver/lists"}