Backup History Feature Added

in #utopian-io7 years ago (edited)

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'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

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @therealsmat I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x