{"id":21492337,"url":"https://github.com/muhamed-didovic/voyager-bread-generator","last_synced_at":"2025-10-20T05:17:19.137Z","repository":{"id":57021784,"uuid":"262561189","full_name":"muhamed-didovic/voyager-bread-generator","owner":"muhamed-didovic","description":"Updated version for Voyager bread generator","archived":false,"fork":false,"pushed_at":"2020-05-13T12:03:32.000Z","size":79,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-18T07:34:09.440Z","etag":null,"topics":["bread-seeder","database","laravel","voyager"],"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/muhamed-didovic.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":"2020-05-09T11:59:40.000Z","updated_at":"2021-12-30T22:33:48.000Z","dependencies_parsed_at":"2022-08-23T12:20:40.046Z","dependency_job_id":null,"html_url":"https://github.com/muhamed-didovic/voyager-bread-generator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhamed-didovic%2Fvoyager-bread-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhamed-didovic%2Fvoyager-bread-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhamed-didovic%2Fvoyager-bread-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhamed-didovic%2Fvoyager-bread-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhamed-didovic","download_url":"https://codeload.github.com/muhamed-didovic/voyager-bread-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226061045,"owners_count":17567574,"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":["bread-seeder","database","laravel","voyager"],"created_at":"2024-11-23T15:28:20.974Z","updated_at":"2025-10-20T05:17:19.074Z","avatar_url":"https://github.com/muhamed-didovic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n## Voyager BREAD generator\r\n\r\nThere is a common issue when we try to deploy local projects to a different environment. Currently, we need to export the database or so, in order to keep all the new BREADs structure across all the environments.\r\n\r\nThe only way to do that without having to create a database import each time is by creating the migrations, seeds, etc. for each bread.\r\n\r\nThis allows the developers to create new BREADs from the command line using Artisan.\r\n\r\n## How to use:\r\n\r\nThis package tries to follow laravel conventions when dealing with classnames. It is recomended that you invoke the command utilising a singluar name for the resource. \r\n\r\nUtilising model names that end in 's' can cause issues as the generator relies on Laravel's singular/plural string methods.\r\n\r\n\r\n### Create a new bread seeder\r\nIf you have an existing model / table called `list_items` with the corresponding model `App\\ListItem`\r\n\r\n```bash\r\n### Create a seeder for an existing model / table\r\nphp artisan voyager:bread list_item\r\n\r\n### Generates database/seeds/ListItemsBreadSeeder.php\r\n```\r\n\r\nYou can also generate the model and migration files\r\n\r\n```bash\r\n## Creat a seeder along with a corresponding model and table migration\r\nphp artisan voyager:bread list_item --migration --model\r\n\r\n### Generates seeder eg: database/seeds/ListItemsBreadSeeder.php\r\n### Generates model class eg: app/ListItem.php\r\n### Generates migration class eg {DATE/TIME}_create_list_items_table.php\r\n```\r\n\r\nIf a seeder class already exists, you can supply the `--force` flag to overwrite the existing file. Any modifications to this file will be lost.\r\n\r\n### Configure the bread seeder\r\nThis command will create a new BooksBreadSeeder file with the basic configuration for a new bread-seed, there you can add/edit all the bread fields. See DataRowsTableSeeder\r\n\r\nThe seeder starts with 3 example columns - edit, duplicate etc as you see fit. See the [voyager docs](https://voyager.readme.io/docs/bread) for reference.\r\n\r\nEverything that can be created in the voyager admin can be created via these seeders, as most of the advanced voyager features translate into json in the 'details' of the input field.\r\n\r\n### Running your seeders\r\n\r\nIn order to run a newly created seeder, you must regenerate your autoloader\r\n\r\n```bash\r\ncomposer dumpautoload\r\n```\r\n\r\nTo run a seed for a particular class, run `db:seed` with the `--class` flag.\r\n\r\n```bash\r\nphp artisan db:seed --class=ListItemsBreadSeeder\r\n```\r\n\r\nTo run all seeds..\r\n\r\n```bash\r\nphp artisan db:seed\r\n```\r\n\r\nIf you have generated new menu items as part of your seeding process, you will need to regenerate permissions before you can view them in the admin.\r\n\r\n```bash\r\nphp artisan db:seed --class=PermissionRoleTableSeeder\r\n```\r\n\r\nYou can also do this manually from the admin panel\r\n\r\n**Model / Migration considerations**\r\n\r\n\r\nIf you created new model and migration, don't forget to run the migration.\r\n\r\n```bash\r\nphp artisan migrate\r\n```\r\n\r\n## Credits\r\n\r\n- [Muhamed Didovic][link-author]\r\n- [Goran Radosevic][link-goran]\r\n\r\n\r\n[link-author]: https://github.com/muhamed-didovic\r\n[link-goran]: https://github.com/gradosevic","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhamed-didovic%2Fvoyager-bread-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhamed-didovic%2Fvoyager-bread-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhamed-didovic%2Fvoyager-bread-generator/lists"}