{"id":20309334,"url":"https://github.com/zulfikar-ditya/laravel-api-controller-helper","last_synced_at":"2026-05-19T07:10:05.676Z","repository":{"id":52185891,"uuid":"496838095","full_name":"zulfikar-ditya/laravel-api-controller-helper","owner":"zulfikar-ditya","description":"This is my controller api helper for laravel app","archived":false,"fork":false,"pushed_at":"2023-07-03T11:11:30.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T22:56:36.242Z","etag":null,"topics":["api-helper","controller","helper","laravel","laravel-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zulfikar-ditya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-27T02:35:45.000Z","updated_at":"2022-08-19T02:41:46.000Z","dependencies_parsed_at":"2024-11-14T17:41:31.241Z","dependency_job_id":null,"html_url":"https://github.com/zulfikar-ditya/laravel-api-controller-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zulfikar-ditya/laravel-api-controller-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zulfikar-ditya%2Flaravel-api-controller-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zulfikar-ditya%2Flaravel-api-controller-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zulfikar-ditya%2Flaravel-api-controller-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zulfikar-ditya%2Flaravel-api-controller-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zulfikar-ditya","download_url":"https://codeload.github.com/zulfikar-ditya/laravel-api-controller-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zulfikar-ditya%2Flaravel-api-controller-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33205686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api-helper","controller","helper","laravel","laravel-api"],"created_at":"2024-11-14T17:26:50.149Z","updated_at":"2026-05-19T07:10:05.655Z","avatar_url":"https://github.com/zulfikar-ditya.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Api Controller Helper \nThis is my controller api helper for laravel app\n\n## Usage\n\n\u003e - Move file ControllerHelpers.php to App\\Traits\n\u003e - then add ControllerHelpers trait in \\App\\Http\\Controllers\\Controller\n\n```php\n\n...\n use App\\Traits\\ControllerHelpers;\n...\n\n...\n    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;\n    use ControllerHelpers;\n...\n```\n\n\nSimple use:\n```php\n$users = \\App\\Models\\User::all();\n\nreturn $this-\u003ereponseJsonData($users);\n```\n\n## Upload File Helper\nsome time we need to do some driven design like using service and repository. You can simpify to use the `UploadFile.php` instead the entire controller helpers\n\n```php\nuse \\App\\Traits\\UploadFile;\n\n...\n\n$this-\u003euploadFile($request-\u003efile('file-name'), 'file-folder');\n\n...\n$this-\u003edeleteFile($model-\u003efile_name ?? '');\n$this-\u003euploadFile($request-\u003efile('file-name'), 'file-folder');\n...\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzulfikar-ditya%2Flaravel-api-controller-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzulfikar-ditya%2Flaravel-api-controller-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzulfikar-ditya%2Flaravel-api-controller-helper/lists"}