{"id":16461929,"url":"https://github.com/milwad-dev/laravel-crod","last_synced_at":"2025-04-06T15:12:45.559Z","repository":{"id":65510525,"uuid":"513229533","full_name":"milwad-dev/laravel-crod","owner":"milwad-dev","description":"Make easy \u0026 fast crud for Laravel with automatic query like AI ","archived":false,"fork":false,"pushed_at":"2024-09-20T13:36:56.000Z","size":792,"stargazers_count":109,"open_issues_count":2,"forks_count":11,"subscribers_count":7,"default_branch":"1.x","last_synced_at":"2024-10-12T11:09:51.351Z","etag":null,"topics":["crud","larave-crod","larave-crod-library","larave-crud","larave-crud-maker","larave-crud-package","laravel","laravel-crud-api","laravel-crud-generator","laravel-crud-library","laravel-library","laravel-package","package","php","query"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/milwad/laravel-crod","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/milwad-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["milwad"]}},"created_at":"2022-07-12T17:14:24.000Z","updated_at":"2024-09-23T14:07:32.000Z","dependencies_parsed_at":"2023-02-14T20:15:45.463Z","dependency_job_id":"39f2c49e-6005-44c5-b9b3-7b4d97930f64","html_url":"https://github.com/milwad-dev/laravel-crod","commit_stats":{"total_commits":238,"total_committers":6,"mean_commits":"39.666666666666664","dds":0.04201680672268904,"last_synced_commit":"168a7dcd76d316f429ac55c234faf33948717738"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milwad-dev%2Flaravel-crod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milwad-dev%2Flaravel-crod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milwad-dev%2Flaravel-crod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milwad-dev%2Flaravel-crod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milwad-dev","download_url":"https://codeload.github.com/milwad-dev/laravel-crod/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500469,"owners_count":20948880,"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":["crud","larave-crod","larave-crod-library","larave-crud","larave-crud-maker","larave-crud-package","laravel","laravel-crud-api","laravel-crud-generator","laravel-crud-library","laravel-library","laravel-package","package","php","query"],"created_at":"2024-10-11T11:09:54.238Z","updated_at":"2025-04-06T15:12:45.542Z","avatar_url":"https://github.com/milwad-dev.png","language":"PHP","funding_links":["https://github.com/sponsors/milwad"],"categories":[],"sub_categories":[],"readme":"# Laravel Crod\n\n\u003cimg src=\"https://banners.beyondco.de/Laravel%20Crod.png?theme=light\u0026packageManager=composer+require\u0026packageName=milwad%2Flaravel-crod\u0026pattern=architect\u0026style=style_1\u0026description=Generate+crud+files+easy\u0026md=1\u0026showWatermark=0\u0026fontSize=100px\u0026images=https%3A%2F%2Flaravel.com%2Fimg%2Flogomark.min.svg\" /\u003e\n\n[![PHP Version Require](https://img.shields.io/packagist/dependency-v/milwad/laravel-crod/php.svg)](https://packagist.org/packages/milwad/laravel-crod)\n[![Latest Stable Version](https://img.shields.io/packagist/v/milwad/laravel-crod.svg)](https://packagist.org/packages/milwad/laravel-crod)\n[![Total Downloads](https://img.shields.io/packagist/dt/milwad/laravel-crod.svg)](https://packagist.org/packages/milwad/laravel-crod)\n[![License](https://img.shields.io/packagist/l/milwad/laravel-crod.svg)](https://packagist.org/packages/milwad/laravel-crod)\n[![Passed Tests](https://github.com/milwad-dev/laravel-crod/actions/workflows/run-tests.yml/badge.svg)](https://github.com/milwad-dev/laravel-crod/actions/workflows/run-tests.yml)\n\n***\nLaravel crod is a package for implementing CRUD faster and easier.\nYou can quickly create controllers, models, migrations, services, repositories, views and requests.\nYou can make it automatically fillable for models, query for repositories and services, make resource controllers, and have a lot of options.\n\nDocs: https://github.com/milwad-dev/laravel-crod/wiki\n\n## Requirements\n\n***\n\n- `PHP: ^8.0`\n- `Laravel framework: ^9`\n- `doctrine/dbal: ^3.6`\n\n| Crod | L7                 | L8                 | L9                 | L10                | L11                |\n|------|--------------------|--------------------|--------------------|--------------------|--------------------|\n| 1.0  | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x:                | :x:                |\n| 1.1  | :x:                | :x:                | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n| 1.2  | :x:                | :x:                | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n| 1.3  | :x:                | :x:                | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n| 1.4  | :x:                | :x:                | :white_check_mark: | :white_check_mark: | :white_check_mark: |\n\n## Installation\n\n***\n\n```bash\ncomposer require milwad/laravel-crod\n```\n\nAfter installation, you need to publish config files. \u003cbr\u003e\n\n```bash\nphp artisan vendor:publish --provider=\"Milwad\\LaravelCrod\\LaravelCrodServiceProvider\" --tag=\"laravel-crod-config\"\n```\n\n## Check active commands\n\nWhen you install the `Laravel Crod`, a series of commands will be activated for you. For see these commands, you can run below command: \u003cbr\u003e\n\n```bash\nphp artisan\n```\n\n![Crod commands](https://s6.uupload.ir/files/carbon_(1)_tqmq.png \"Crod commands\")\n\n## Make CRUD files\n\nFor creating crud files, you need to run the `crud:make` command in your terminal: \u003cbr\u003e\n\n```bash\nphp artisan crud:make {name}\n``` \n\n\u003cbr\u003e\n\nFor example \u003cbr\u003e\n\n```bash\nphp artisan crud:make Product\n```\n\nWhen you execute this command, after creating the files, you will see a list of options that will create a series of additional files for you, which of course are optional, you can choose and if you need, it will create additional files for you such as `seeder`, `factory`, `repository`, etc.\n\n✅ After, you can see `Laravel Crod` creates crud files such as `Model`, `Controller`, `Form-Requests`, `Migrations` etc.\n\n## CRUD Query\n\nIf you run `crud:query` command, the result is:\n\n- Add `index`, `create`, `store`, `edit`, `update`, `destroy` function to your controller\n- Get all migration columns and move it to your model fillable\n- Add `index`, `findById`, `delete` functions to your repositories\n- Add `store`, `update` functions to your services\n- Add resource route (SOON)\n\n\u003cstrong\u003e** You must run the migrate command, before `crud:query` command. ** \u003c/strong\u003e \u003cbr\u003e\n\n```bash\nphp artisan migrate\n```\n\nFor using automatic query, you can run below command:\n\n```bash\nphp artisan crud:query {table_name} {model} {--id-controller}\n```\n\nFor example:\n\n```bash\nphp artisan crud:query products Product\n```\n\nWhen you add `--id-controller` option, the `Laravel Crod` create crud functions without [Route Model Binding](https://laravel.com/docs/routing#route-model-binding) in controller.\n\nAfter you can see `Laravel Crod` added query to service, repository, controller, model, etc.\n\n## CRUD for Module\n\nIf you are using Modular Architecture, you are able to run `crud:make-module` command. This command create a new module and create the default crud files such as `Model`, `Controller`, `Migration`, etc:\n\n```bash\nphp artisan crud:make-module {module_name}\n```\n\nFor example:\n\n```bash\nphp artisan crud:make-module Product\n```\n\nWhen you execute this command, after creating the files, you will see a list of options that will create a series of additional files for you, which of course are optional, you can choose and if you need, it will create additional files for you such as `seeder`, `factory`, `repository`, etc.\n\n## CRUD Query for Module\n\nThis command adds query and date to CRUD files for module.\nThis command is similar to `crud:query` command, but this command is for module. if you have a modular you can write your module name and `Laravel Crod` find it automatically.\n\n** You must run your migration file **\n\n```\nphp artisan crud:query-module {table_name} {model} {--id-controller}\n```\n\nFor example:\n\n```bash\nphp artisan crud:query-module products Product\n```\n\nOR\n\n```bash\nphp artisan crud:query-module products Product --id-controller\n```\n\nWhen you add `--id-controller` option, the `Laravel Crod` create crud functions without [Route Model Binding](https://laravel.com/docs/routing#route-model-binding) in controller.\n\nAfter you can see `Laravel Crod` added query to service, repository, controller, model, ... for your module.\n\n## Custom path\n\nYou can custom file path in config file. ``````\n\nWith `Laravel Crod` config, you can customize the commands, for example you want to set the route file name.\nThis config file exists in `config/laravel-crod.php`:\n\n```php\n\u003c?php\n\nreturn [\n    /*\n     * Repository namespace.\n     *\n     * This is a word that move into the latest name of repository file, for ex: ProductRepo.\n     * If this value is changed, any repos that are created will be renamed, for ex: ProductRepository.\n    */\n    'repository_namespace' =\u003e 'Repo',\n\n    /*\n     * Get main controller.\n     *\n     * This is a namespace of main controller that default path is `App\\Http\\Controllers\\Controller`.\n     */\n    'main_controller' =\u003e 'App\\Http\\Controllers\\Controller',\n\n    /*\n     * Are using PEST?\n     *\n     * If you are using PEST framework, you can change it this value to `true`.\n     */\n    'are_using_pest' =\u003e false,\n\n    /*\n     * Route namespace.\n     *\n     * This is a word that move into the latest name of route file.\n     */\n    'route_namespace' =\u003e '',\n\n    /*\n     * Route name.\n     *\n     * This is a word that name of route file.\n     */\n    'route_name' =\u003e 'web',\n\n    /*\n     * Modules config.\n     *\n     * You can make custom modules with special folders ... .\n     */\n    'modules' =\u003e [\n        'module_namespace'  =\u003e 'Modules', // This value is for the name of the folder that the modules are in.\n        'model_path'        =\u003e 'Entities', // This value is for the name of the folder that contains the module models.\n        'migration_path'    =\u003e 'Database\\Migrations', // This value is for the name of the folder that contains the module migrations.\n        'controller_path'   =\u003e 'Http\\Controllers', // This value is for the name of the folder that contains the module controllers.\n        'request_path'      =\u003e 'Http\\Requests', // This value is for the name of the folder that contains the module requests-form.\n        'view_path'         =\u003e 'Resources\\Views', // This value is for the name of the folder that contains the module views.\n        'service_path'      =\u003e 'Services', // This value is for the name of the folder that contains the module services.\n        'repository_path'   =\u003e 'Repositories', // This value is for the name of the folder that contains the module Repositories.\n        'feature_test_path' =\u003e 'Tests\\Feature', // This value is for the name of the folder that contains the module feature-tests.\n        'unit_test_path'    =\u003e 'Tests\\Unit', // This value is for the name of the folder that contains the module unit-tests.\n        'provider_path'     =\u003e 'Providers', // This value is for the name of the folder that contains the module providers.\n        'factory_path'      =\u003e 'Database\\Factories', // This value is for the name of the folder that contains the module factories.\n        'seeder_path'       =\u003e 'Database\\Seeders', // This value is for the name of the folder that contains the module seeders.\n        'route_path'        =\u003e 'Routes', // This value is for the name of the folder that contains the module routes.\n    ],\n\n    /*\n     * Queries.\n     *\n     * This is some config for add queries.\n     */\n    'queries' =\u003e [\n        /*\n         * Except columns in fillable.\n         *\n         * This `except_columns_in_fillable` must be arrayed!\n         * This `except_columns_in_fillable` that remove field from $fillable in model.\n         */\n        'except_columns_in_fillable' =\u003e [\n            'id', 'updated_at', 'created_at',\n        ],\n    ],\n];\n```\n\n## License\n\n* This package is created and modified by \u003ca href=\"https://github.com/milwad-dev\" target=\"_blank\"\u003eMilwad Khosravi\u003c/a\u003e\n  for Laravel \u003e= 9 and is released under the MIT License.\n\n## Testing\n\nRun the tests with:\n\n``` bash\nvendor/bin/phpunit\ncomposer test\ncomposer test-coverage\n```\n\n## Contributing\n\nThis project exists thanks to all the people who\ncontribute. [CONTRIBUTING](https://github.com/milwad-dev/laravel-crod/graphs/contributors)\n\n\u003ca href=\"https://github.com/milwad-dev/laravel-crod/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/laravel-crod/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\n## Security\n\nIf you've found a bug regarding security please mail [milwad.dev@gmail.com](mailto:milwad.dev@gmail.com) instead of\nusing the issue tracker.\n\n## Conclusion\n\nThe `Laravel-Crod` is a simple yet powerful package that can help you create CRUD operations for your Laravel models in just a few lines of code. By following this documentation, you should now have a better understanding of how to use the package in your Laravel project. If you have any issues or questions, please feel free to open an issue on the package's GitHub repository.\n\n## Donate\n\nIf this package is helpful for you, you can buy a coffee for me :) ❤️\n\n- Iraninan Gateway: https://daramet.com/milwad_khosravi\n- Paypal Gateway: SOON\n- MetaMask Address: `0xf208a562c5a93DEf8450b656c3dbc1d0a53BDE58`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilwad-dev%2Flaravel-crod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilwad-dev%2Flaravel-crod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilwad-dev%2Flaravel-crod/lists"}