Backup History Feature Added

Words
225
Reading
1 min
Listen
Play
9y

Laravel push db is a laravel 5 package that allows for easy database backups.

Previous contribution

https://utopian.io/utopian-io/@therealsmat/open-source-database-backup-package-with-laravel

New Features

There are two major additions in this release of the package. The first new feature is inspired by codingdefined@codingdefined's comment on the original post.

  • Backup history feature

Previously, a new backup generated would overwrite the previous backup. This means that you only have access to the most recent backup. With this new release, you can now get a list of all your previous backups using a public backups(); method. For example;


<?php

class BackupsController extends Controller {
         public function getBackups(PushDb $db){
                return $db->backups();
         }
}

What you get is an array that looks like this;
Screenshot from 2018-02-03 15-57-39.png

This feature is particularly important as you can create a dashboard to keep track of you database backups. You can convert the array to a collection object so as to perform further queries on it.

  • You can now specify the directory you want your backups to be placed from the pushdb.php config file.

As a tip, you can create a notifications class to be called when a new backup is generated. I originally added this feature, then removed it after discovering its not flexible to add it in the package.

Commits

https://github.com/therealSMAT/laravel-push-db/commit/3de34a9b435824e1b1a4ffff0003bdd1db11c66a

https://github.com/therealSMAT/laravel-push-db/commit/48ca3018720df55d27fc2225ee45f8a427b21dfb

https://github.com/therealSMAT/laravel-push-db/commit/8c1a6763cfbb4d28111ddac25690d759eae3937c

How to contribute

  • Clone the repository
  • Create a new branch
  • Send a Pull Request with the new features.

You can send me a mail @tosinsoremekun.com

Github Link https://github.com/therealSMAT/laravel-push-db



Posted on Utopian.io - Rewarding Open Source Contributors

Backup History Feature Added | Ecency