Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel backup

composer require spatie/laravel-backup
//To publish the config file to config/backup.php
php artisan vendor:publish --provider="SpatieBackupBackupServiceProvider"
//Once installed run 
php artisan backup:run
//clean up your backups
php artisan backup:clean
//Determining which backups should be deleted is mention in config/backup.php
Comment

how to backup laravel project with database

//First install laravel spatie using following commands
composer require spatie/laravel-backup
php artisan vendor:publish --provider="SpatieBackupBackupServiceProvider"

//now in config/backup.php file replace replace 
relative_path = null, 
  to
relative_path= base_path(),

//now add this code inside config/database.php
'connections' => [
	'mysql' => [
		'driver'    => 'mysql'
		...,
		'dump' => [
                'dump_binary_path' => 'C:xamppmysqlin', // only the path, so without `mysqldump` or `pg_dump`
                'use_single_transaction',
                'timeout' => 60 * 5, // 5 minute timeout
                'exclude_tables' => ['table1', 'table2'
                ],             ]
	],
//now run following command to generate backup of project with database
php artisan backup:run
//you can find the backup files inside storageapp
Comment

laravel backup

composer require spatie/laravel-backup
Comment

PREVIOUS NEXT
Code Example
Php :: return view controller laravel 
Php :: wp logs 
Php :: Undefined index: HTTP_HOST 
Php :: laravel old value not working in textarea 
Php :: create slug with php 
Php :: laravel artisan cache clear 
Php :: datetime php 
Php :: phpspreadsheet middle align 
Php :: gmdate in php 
Php :: merge two arrays one as key to another php 
Php :: php read csv to array 
Php :: get single column value in laravel eloquent 
Php :: remove cache from cpanle larael 
Php :: routing code in drupal 8 
Php :: how to build jquery messages notification with php and mysq 
Php :: get image width and height in laravel 
Php :: pre function for PHP 
Php :: remove last all special character from string php 
Php :: laravel insert timestamp now 
Php :: how to convert array to string in php 
Php :: create foreign key laravel migration 
Php :: how to get current location in laravel 
Php :: print try catche errors 
Php :: codeingiter 3 where in 
Php :: wordpress register post type 
Php :: laravel force delete 
Php :: set names utf8 
Php :: how to get data from a table in laravel 
Php :: wordpress loop over posts but exclude current post 
Php :: php sort by associative array value 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =