定制 oalid-cse/laravel-db-export 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oalid-cse/laravel-db-export

Composer 安装命令:

composer require oalid-cse/laravel-db-export

包简介

Database Export in Laravel

README 文档

README

A simple mysql database export package for laravel.

  • You can export your database easily in laravel by using this package
  • For Security perpose you can set whitlist ip addresses to set limited access

Installation

Install the package through Composer. Run the Composer require command from the Terminal:

composer require oalid-cse/laravel-db-export

If you are using Laravel 5.5 or updated version, this is all there is to do for installation.

If you still using on version 5.4 or less of Laravel, the final steps for you are to add the service provider of the package and alias the package. To do this open your config/app.php file.

Add the following line to the providers array:

OalidCse\DBExport\DBExportServiceProvider::class,

And optionally add the following line to the aliases array:

'DBExport' => OalidCse\DBExport\DBExportController::class,

Now you're ready to start using the laravel-db-export in your application.

Uses

The LaravelDBExport gives you database content. You just need to download it.

Your Content:

$content = DBExport::export_database();

For Download:

return response()->download($content);

If you need to customize the database name then use:

return response()->download($content, 'custom-name.sql');

Export Database Example:

In your route routes/web.php use:

Route::get('/your-route', function(){
    $content = DBExport::export_database();
    return response()->download($content, 'demo.sql');
});

Set Whitelist IP's

For whitelist ip in your .env file use DB_EXPORT_VALID_IPS variable. Seperate all ip using comma ","

example:
DB_EXPORT_VALID_IPS:"192.168.1.1,192.168.1.2,192.168.1.3"

Happy Coding :)

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固