使用Laravel 4导出数据库(仅数据) [英] Export database (only data) with Laravel 4

查看:142
本文介绍了使用Laravel 4导出数据库(仅数据)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到一个包或方法,该包或方法允许我从数据库(SQL)导出所有数据以备份数据库.

I'm trying to find a package or method which allow me to export all the data from my database (SQL) in order to backup the database.

目标是要有一个按钮来将数据库保存到SQL文件中并下载,因此我需要控制器中的一种方法来导出数据.

The goal is to have a button to save the database in a SQL file and download it, so i need a method in a controller to export the data.

我在 http://packalyst.com/packages

有人知道这样做的方法吗?

Is somebody knows a way to do that ?

谢谢

推荐答案

您可以使用此软件包-这是一个出色的备份管理器:

You can use this package - which is an excellent backup manager:

https://github.com/heybigname/backup-manager

如果您希望可以通过控制器访问它-您可以从控制器中调用artisan命令:

If you want it to be accessible via a controller - you can just call the artisan command from your controller:

function someControllerFunction()
{
    Artisan::call('db:backup');
}

这篇关于使用Laravel 4导出数据库(仅数据)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆