{"id":16412006,"url":"https://github.com/junaidqadirb/cray","last_synced_at":"2025-04-05T07:08:07.641Z","repository":{"id":37814988,"uuid":"225117985","full_name":"JunaidQadirB/cray","owner":"JunaidQadirB","description":"A Laravel package to help you generate nearly complete CRUD pages like crazy! ","archived":false,"fork":false,"pushed_at":"2023-12-26T08:17:58.000Z","size":271,"stargazers_count":240,"open_issues_count":0,"forks_count":17,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-12T06:47:14.524Z","etag":null,"topics":["crud","generator","laravel","laravel-package","php","scaffolder"],"latest_commit_sha":null,"homepage":"","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/JunaidQadirB.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2019-12-01T06:39:46.000Z","updated_at":"2024-09-02T19:50:23.000Z","dependencies_parsed_at":"2024-10-25T18:03:57.180Z","dependency_job_id":"fe52056a-d6f5-4e18-8961-e2d843807483","html_url":"https://github.com/JunaidQadirB/cray","commit_stats":{"total_commits":94,"total_committers":4,"mean_commits":23.5,"dds":0.0957446808510638,"last_synced_commit":"689e77b6155ef2acd2657bf42f0ae77e91d0bb85"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidQadirB%2Fcray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidQadirB%2Fcray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidQadirB%2Fcray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidQadirB%2Fcray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JunaidQadirB","download_url":"https://codeload.github.com/JunaidQadirB/cray/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299833,"owners_count":20916190,"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","generator","laravel","laravel-package","php","scaffolder"],"created_at":"2024-10-11T06:47:18.255Z","updated_at":"2025-04-05T07:08:07.618Z","avatar_url":"https://github.com/JunaidQadirB.png","language":"PHP","readme":"# Cray For Laravel\n[![Latest Stable Version](http://poser.pugx.org/jq/cray/v)](https://packagist.org/packages/jq/cray)\n[![Latest Unstable Version](http://poser.pugx.org/jq/cray/v/unstable)](https://packagist.org/packages/jq/cray)\n[![Daily Downloads](http://poser.pugx.org/jq/cray/d/daily)](https://packagist.org/packages/jq/cray)\n[![Total Downloads](http://poser.pugx.org/jq/cray/downloads)](https://packagist.org/packages/jq/cray)\n[![Quality Score](https://img.shields.io/scrutinizer/g/junaidqadirb/cray.svg?style=flat-square)](https://scrutinizer-ci.com/g/junaidqadirb/cray)\n[![License](http://poser.pugx.org/jq/cray/license)](https://packagist.org/packages/jq/cray)\n[![PHP Version Require](http://poser.pugx.org/jq/cray/require/php)](https://packagist.org/packages/jq/cray)\n\n\n## What is Cray?\n\nCray is a `disposable` Laravel package to help you generate nearly complete CRUD pages like crazy. Literally. It's also a bit opinionated.\n\n\n\nIf you build straight-forward CRUD pages more often manually writing all the same logic becomes a chore. Cray will not only save you a save but also give you a better way to organize your code.\n\n\n\n## So what do you mean by disposable?\n\nYou use Cray and forget about it. It isn't coupled with your installation of Laravel and it is preferred to be installed as a `dev` dependency. Cray generates the files and it forgets about them and they are all yours to modify do whatever you want.\n\n\n\n## What does it actually do?\n\nSuppose you are building a blog, and you want to create a Post model then you have to do a ton of other tedious and to be honest, boring things like creating migrations, model factories, the controller, form validation and adding all the logic and what not.\n\n\n\nSo what Cray does is when you tell it the model name, it will do all those boring things I listed earlier. When it's done you have the following:\n\n- `Post.php`\n- `PostController.php` with all the necessary logic to list, edit, create and delete posts.\n- `PostStoreRequest.php` and `PostUpdateRequest.php` \n- Timestamped `create_posts_table.php` migration file\n- `PostFactory.php`\n- `posts` views directory with `index.blade.php`, `create.blade.php`, `edit.blade.php`, `show.blade.php`, `modals/delete.blade.php`as well as a blank `_form.blade.php` for you to add the fields.\n\n\n\n Then all you have to do is: \n\n- Add the columns to the migration file\n- Add the necessary fields (as defined in the last step) to the `_form.blade.php`\n- Add validation rules for the fields you added to the form.\n\n\n\n## Installation\n\n```bash\ncomposer require jq/cray --dev\n```\nOr specify specific version, for example to try a beta\n\n```bash\ncomposer require \"jq/cray:3.2.0-beta3\" --dev\n```\n\nThen publish the stubs\n\n```bash\nphp artisan vendor:publish --tag=cray\n```\n\nIt will generate `stubs` to `resources/vendor/cray/stubs` directory.\n\n\n\n## Usage\n\n```bash\nphp artisan cray Post\n```\n\nOnce done, it will show you the details of the files generated.\n\n```bash\nFactory created successfully in /database/factories/PostFactory.php\nCreated Migration: 2020_03_14_151409_create_posts_table\nModel created successfully in /app/Post.php\nController created successfully in /app/Http/Controllers/PostController.php\nView created successfully in /resources/views/posts/index.blade.php\nView created successfully in /resources/views/posts/create.blade.php\nView created successfully in /resources/views/posts/_form.blade.php\nView created successfully in /resources/views/posts/edit.blade.php\nView created successfully in /resources/views/posts/show.blade.php\nView created successfully in /resources/views/posts/modals/delete.blade.php\nRequest created successfully in /app/Http/Requests/PostStoreRequest.php\nRequest created successfully in /app/Http/Requests/PostUpdateRequest.php\n```\n\nNow add the necessary fields and run\n\n```bash\nphp artisan migrate\n```\n\nAnd that saved you an hour worth of repetitive and boring work which you can spend on more important development challenges.\n\n### Optional Packages\n - [Blade Components](https://github.com/JunaidQadirB/blade-components)\n\n## Documentation\nYou can read the documentation [here](https://junaidqadirb.github.io/cray/).\n\n### Changelog\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email junaidqadirb@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Laravel](https://github.com/laravel)\n- [Junaid Qadir](https://github.com/junaidqadirb)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Laravel Package Boilerplate\n\nThis package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaidqadirb%2Fcray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunaidqadirb%2Fcray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaidqadirb%2Fcray/lists"}