项目作者: techmahedy

项目描述 :
A mysql database backup package for laravel
高级语言: PHP
项目地址: git://github.com/techmahedy/laravel-backup.git
创建时间: 2021-04-03T08:14:48Z
项目社区:https://github.com/techmahedy/laravel-backup

开源协议:

下载


Laravel Database Backup Package

Scrutinizer Code Quality
Issues
Stars

This package will take backup your mysql database automatically via cron job.

Installing laravel-backup

The recommended way to install laravel-backup package using composer

  1. composer require codecheef/backup

If your Laravel project version is less than 5 then

Add the service provider to config/app.php

‘providers’ => [

  1. Codecheef\Backup\BackupServiceProvider::class,

],

To test this package create a ‘database’ directory inside your public folder.

Creating Directory

  1. /public/database

Then run below command to test it

  1. php artisan backup:run

Setup Cron

To run it via cron job do it inside your app/Console/Kernel.php

protected $commands = [

  1. BackupCommand::class

];

and now call it via shceduller that when you want to run it, like daily weekly etc.