{"id":22702173,"url":"https://github.com/atnic/laravel-generator","last_synced_at":"2025-04-13T07:56:46.134Z","repository":{"id":44847973,"uuid":"116114512","full_name":"Atnic/laravel-generator","owner":"Atnic","description":"Laravel Generator","archived":false,"fork":false,"pushed_at":"2022-09-21T07:28:52.000Z","size":583,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-13T07:56:38.361Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Atnic.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}},"created_at":"2018-01-03T08:52:56.000Z","updated_at":"2025-03-25T01:18:55.000Z","dependencies_parsed_at":"2022-09-01T20:01:55.095Z","dependency_job_id":null,"html_url":"https://github.com/Atnic/laravel-generator","commit_stats":null,"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atnic%2Flaravel-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atnic%2Flaravel-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atnic%2Flaravel-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atnic%2Flaravel-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atnic","download_url":"https://codeload.github.com/Atnic/laravel-generator/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681488,"owners_count":21144700,"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-12-10T07:12:28.392Z","updated_at":"2025-04-13T07:56:46.111Z","avatar_url":"https://github.com/Atnic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Generator\n\n## Installation\n```bash\ncomposer require atnic/laravel-generator\n```\n\n## Make Module (CRUD)\nThis package is overriding some laravel artisan command.\n\nThis is example to make Foo module in this project\n```bash\nphp artisan make:controller --model=Foo FooController\n```\nIf create custom directory for model like this:\n```\nphp artisan make:controller --model=App\\\\Models\\\\Foo FooController\n```\nThen do this steps:\n- [x] Check new migration in `database/migrations/`, add column needed.\n- [x] Check new factory in `database/factories/`, add atrribute needed.\n- [x] Check new model in `app/`, add changes needed.\n- [x] Check new filter in `app/Filters/`, do all `TODO:` and remove the comment if done.\n- [x] Check lang en `resources/lang/en` and copy from en to lang id `resources/lang/id`, add language as needed.\n- [x] Check new controller in `app/Http/Controllers/`, complete returned array in method `relations()` `visibles()` `fields()` `rules()`, do all `TODO:`, and remove comment if done.\n- [x] Check new policy in `app/Policies/`, do all `TODO:` and remove the comment if done.\n- [x] No need to append new Policy to `$policies` attribute in `app/Providers/AuthServiceProvider.php`. This package handle policy auto discovery, even for Laravel \u003c 5.8.\n- [x] Check new views (index, create, show, edit) in `resources/views/`, add/extend section for title or anything.\n- [x] Check new tests in `tests/Feature/`, do all `TODO:` and remove the comment if done.\n\n## Other Useful command\n\n```bash\n#Creating Nested Controller\nphp artisan make:controller --parent=Foo --model=Bar Foo/BarController\n\n#Creating Nested Controller with custom directory for model\nphp artisan make:controller --parent=App\\\\Models\\\\Foo --model=App\\\\Models\\\\Bar Foo/BarController\n\n#Create Single Action Controller\nphp artisan make:controller DashboardController\n\n#Creating Api Controller\nphp artisan make:controller-api --model=Foo FooController\n\n#Creating Api Controller with custom directory for model\nphp artisan make:controller-api --model=App\\\\Models\\\\Foo FooController\n\n#Creating Nested Controller API\nphp artisan make:controller-api --parent=Foo --model=Bar Foo/BarController\n\n#Creating Nested Controller API with custom directory for model\nphp artisan make:controller-api --parent=App\\\\Models\\\\Foo --model=App\\\\Models\\\\Bar Foo/BarController\n```\n\nAll new/overrided command can be viewed in `vendor/atnic/laravel-generator/app/Console/Commands`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatnic%2Flaravel-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatnic%2Flaravel-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatnic%2Flaravel-generator/lists"}