Skip to content

ConfigBackup ​

php
final class Zairakai\LaravelDevTools\Services\ConfigBackup

Keeps a copy of a file before a forced publication writes over it.

The copies of a run go in .dev-tools-backup/<UTC date and time>/, under their path from the root of the project (the same folder and layout as backup_file of the shell scripts). The folder is created by the first copy.

Source: src/Services/ConfigBackup.php

Constants ​

NameValueDescription
FOLDER'.dev-tools-backup'

Methods ​

__construct() ​

php
public function __construct(string $root, string $timestamp = '')

directoryUsed() ​

php
public function directoryUsed(): string

The folder of the copies of this run, or null when nothing was saved.

save() ​

php
public function save(string $file): bool

Copies the file, if it exists. A symbolic link is not copied.

Returns bool true when a copy was made

Documentation of 5.5.0 , built from 92a7387 on 5.5.0 by pipeline #3086393151 on 2026-11-18.