{"id":19040203,"url":"https://github.com/logisticinfotech/laravel-database-snapshot-from-admin-ui","last_synced_at":"2026-05-08T04:10:14.718Z","repository":{"id":34783563,"uuid":"183397883","full_name":"logisticinfotech/Laravel-Database-Snapshot-from-Admin-UI","owner":"logisticinfotech","description":"Laravel Database Snapshot from Admin UI","archived":false,"fork":false,"pushed_at":"2023-01-03T20:27:06.000Z","size":2998,"stargazers_count":1,"open_issues_count":24,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-02T07:10:26.037Z","etag":null,"topics":["database","database-backup","laravel","laravel-admin","snapshot"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/logisticinfotech.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":"2019-04-25T09:07:27.000Z","updated_at":"2020-04-14T09:51:10.000Z","dependencies_parsed_at":"2023-01-15T09:15:49.308Z","dependency_job_id":null,"html_url":"https://github.com/logisticinfotech/Laravel-Database-Snapshot-from-Admin-UI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logisticinfotech%2FLaravel-Database-Snapshot-from-Admin-UI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logisticinfotech%2FLaravel-Database-Snapshot-from-Admin-UI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logisticinfotech%2FLaravel-Database-Snapshot-from-Admin-UI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logisticinfotech%2FLaravel-Database-Snapshot-from-Admin-UI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logisticinfotech","download_url":"https://codeload.github.com/logisticinfotech/Laravel-Database-Snapshot-from-Admin-UI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100521,"owners_count":19747682,"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":["database","database-backup","laravel","laravel-admin","snapshot"],"created_at":"2024-11-08T22:21:13.162Z","updated_at":"2026-05-08T04:10:09.674Z","avatar_url":"https://github.com/logisticinfotech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://laravel.com/assets/img/components/logo-laravel.svg\"\u003e\u003c/p\u003e\n\n# Laravel Database Snapshot Admin UI\n\nLaravel Database Snapshot Admin UI is one type of admin panel in which you can take a snapshot of the database, show previously taken database snapshot list, download snapshot SQL file and delete the snapshot file. \n\n- **Create a Laravel Project**\n\t\t\n\t\tLaravel new db-snapshot-admin-UI \n\n- **Install Database Snapshot Package Via Composer**\n\t\t\n\t\tcomposer require spatie/laravel-db-snapshots\n\n- **Service Provider Configuration**\n\t\t\n\tIf Laravel 5.4 or below version you must add below code otherwise it will be auto-registered.\n\tOpen the file config/app.php and then add following service provider\t\t\n\t```\n\t'providers' =\u003e [\n\t\t// ...\n\t\tSpatie\\DbSnapshots\\DbSnapshotsServiceProvider::class,\n\t];\n\t```\n\n- **Filesystem Configuration**\n\t\t\n\tIn config/filesystems.php add following code for creating snapshot disk on which all snapshots will be saved. You can change the driver and root values. \t\t\n\t```\n\t// ...\n\t'disks' =\u003e [\n\t\t// ...\n\t\t'snapshots' =\u003e [\n\t\t\t'driver' =\u003e 'local',\n\t\t\t'root' =\u003e storage_path('snapshots'),\n\t\t],\n\t// ... \n\t```\n\n- **Publish The Configuration File**\n\t\t\n\tThis is optional, you may publish the configuration file using this command to customize your setting.\n\t\tphp artisan vendor:publish --provider=\"Spatie\\DbSnapshots\\DbSnapshotsServiceProvider\" --tag=\"config\"\n\n- **Create an admin login using laravel auth**\n\t\t\n\t\tphp artisan make:auth\n\n- **Database configuration**\n\t\t\n\tIn Env file, specify the value of host, database name, user name, password.\n\t```\n\tDB_HOST=YOUR_HOST\n\tDB_DATABASE=YOUR_DATABASE\n\tDB_USERNAME=YOUR_USERNAME\n\tDB_PASSWORD=YOUR_PASSWORD\n\t```\n\n- **Create Migrations**\n\n- **Create Database Snapshot**\n\t\t\n\t```\n\tArtisan::call('snapshot:create '.$snapshot_name);\n\t```\n\n- **Download Snapshot file**\n\t\n\treturn response()-\u003edownload(storage_path(\"snapshots/\".$snapshot_name.'.sql'));\n\n- **Delete Snapshot file**\n\t\n\tArtisan::call('snapshot:delete '.$snapshot_name);\n\n- **Some useful console commands for database snapshot**\n\t\n\t```\n\tphp artisan snapshot:create file-name   \t\t\t// create snapshot with given name\n\tphp artisan snapshot:create\t\t\t\t\t\t\t// current date time used for file name to create snapshot\n\tphp artisan snapshot:create file-name --compress \t// create compressed snapshots \n\tphp artisan snapshot:load file-name\t\t\t\t\t// Load Snapshot\n\tphp artisan snapshot:load file-name --connection=connectionName  \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Specify connection name when use multiple db connection\n\tphp artisan snapshot:list\t\t\t\t\t\t\t// List of all snapshots\n\tphp artisan snapshot:delete file-name \t\t\t\t// Delete snapshot \n\t```\n\n- **Some useful events**\n\t\n\t```\n\tSpatie\\DbSnapshots\\Events\\CreatingSnapshot  \t\t// Event will be fired before a snapshot is created\n\tSpatie\\DbSnapshots\\Events\\CreatedSnapshot  \t\t\t// Event will be fired after a snapshot has been created\n\tSpatie\\DbSnapshots\\Events\\LoadingSnapshot  \t\t\t// Event will be fired before a snapshot is loaded\n\tSpatie\\DbSnapshots\\Events\\LoadedSnapshot  \t\t\t// Event will be fired after a snapshot has been loaded\n\tSpatie\\DbSnapshots\\Events\\DeletingSnapshot  \t\t// Event will be fired before a snapshot is deleted\n\tSpatie\\DbSnapshots\\Events\\DeletedSnapshot  \t\t\t// Event will be fired after a snapshot has been deleted\n\t```\n\n[Click here](https://github.com/spatie/laravel-db-snapshots) to view Laravel Database Snapshot Package\n\nFor full document please read our [blog](https://www.logisticinfotech.com/blog/laravel-database-snapshot/) here.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogisticinfotech%2Flaravel-database-snapshot-from-admin-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogisticinfotech%2Flaravel-database-snapshot-from-admin-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogisticinfotech%2Flaravel-database-snapshot-from-admin-ui/lists"}