Created
November 21, 2025 06:49
-
-
Save anytizer/c192d21347ec145e2d4c159906982fca to your computer and use it in GitHub Desktop.
Laravel bootsrap attach a secondary sqlite database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| use Illuminate\Support\Facades\DB; | |
| ... | |
| public function boot(): void | |
| { | |
| DB::statement("ATTACH DATABASE '/path/database2.db' AS db2;"); | |
| } | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment