{"id":22559489,"url":"https://github.com/webparking/laravel-db-rebuild","last_synced_at":"2025-04-10T09:27:02.212Z","repository":{"id":57079043,"uuid":"172063125","full_name":"webparking/laravel-db-rebuild","owner":"webparking","description":"A laravel package that allows for quick db rebuilds with presets.","archived":false,"fork":false,"pushed_at":"2020-09-10T10:24:15.000Z","size":93,"stargazers_count":44,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T08:21:13.288Z","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/webparking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-22T12:31:27.000Z","updated_at":"2022-01-11T05:38:42.000Z","dependencies_parsed_at":"2022-08-24T14:56:22.932Z","dependency_job_id":null,"html_url":"https://github.com/webparking/laravel-db-rebuild","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webparking%2Flaravel-db-rebuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webparking%2Flaravel-db-rebuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webparking%2Flaravel-db-rebuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webparking%2Flaravel-db-rebuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webparking","download_url":"https://codeload.github.com/webparking/laravel-db-rebuild/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248146229,"owners_count":21055291,"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-07T21:07:04.564Z","updated_at":"2025-04-10T09:27:02.182Z","avatar_url":"https://github.com/webparking.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  Laravel DB Rebuild\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://travis-ci.org/webparking/laravel-db-rebuild\"\u003e\n        \u003cimg src=\"https://travis-ci.org/webparking/laravel-db-rebuild.svg?branch=master\" alt=\"Build Status\"\u003e\n    \u003c/a\u003e \n    \u003ca href=\"https://scrutinizer-ci.com/g/webparking/laravel-db-rebuild/?branch=master\"\u003e\n        \u003cimg src=\"https://scrutinizer-ci.com/g/webparking/laravel-db-rebuild/badges/quality-score.png?b=master\" alt=\"Quality score\"\u003e\n    \u003c/a\u003e \n    \u003ca href=\"https://scrutinizer-ci.com/g/webparking/laravel-db-rebuild/?branch=master\"\u003e\n        \u003cimg src=\"https://scrutinizer-ci.com/g/webparking/laravel-db-rebuild/badges/coverage.png?b=master\" alt=\"Code coverage\"\u003e\n    \u003c/a\u003e \n\u003c/p\u003e\n\nThis package is meant to provide an easy way of resetting your development database to a certain state.\n\nIn addition to `php artisan migrate:fresh` this package also allows you to backup tables (for example sessions and admin_users, to stay logged in) and run custom seeders or commands based on presets.\n\nThis allows you to easily seed different information for local development, your tests and staging.\n\n## Installation\nAdd this package to composer.\n\n```\ncomposer require webparking/laravel-db-rebuild\n```\n\nPublish the config:\n\n```\nphp artisan vendor:publish --provider=\"Webparking\\DbRebuild\\ServiceProvider\"\n```\n\n## Usage\nThe default usage is the following, this will use the default preset. It will also ask you if you're sure you want to reset the db.\n\n```\nphp artisan db:rebuild\n```\n\nYou an skipp the question by adding the `--f` flag. You can change the preset by adding `--preset=test`\n\n```\nphp artisan db:rebuild --preset=test --f\n```\n\n## Config\n\n\n```PHP\nreturn [\n    'presets' =\u003e [\n        'default' =\u003e [\n            'database' =\u003e 'local_database',\n            'backup' =\u003e [\n                'sessions',\n                'admin_users',\n            ],\n            'commands' =\u003e [\n                'db:seed',\n            ],\n            'seeds' =\u003e [\n                \n            ],\n        ],\n        'test' =\u003e [\n            'database' =\u003e 'testing_database',\n            'backup' =\u003e [\n                'sessions',\n            ],\n            'commands' =\u003e [\n                'db:seed',\n            ],\n            'seeds' =\u003e [\n                TestSeeder::class\n            ],\n        ],\n    ],\n];\n```\n\n## Licence and Postcardware\n\nThis software is open source and licensed under the [MIT license](LICENSE.md).\n\nIf you use this software in your daily development we would appreciate to receive a postcard of your hometown. \n\nPlease send it to: Webparking BV, Cypresbaan 31a, 2908 LT Capelle aan den IJssel, The Netherlands\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebparking%2Flaravel-db-rebuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebparking%2Flaravel-db-rebuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebparking%2Flaravel-db-rebuild/lists"}