REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 2.97 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Database/Console/DumpCommand.php
Text
Base64
<?php namespace Illuminate\Database\Console; use Illuminate\Console\Command; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Database\Connection; use Illuminate\Database\ConnectionResolverInterface; use Illuminate\Database\Events\MigrationsPruned; use Illuminate\Database\Events\SchemaDumped; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Facades\Config; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'schema:dump')] class DumpCommand extends Command { /** * The console command name. * * @var string */ protected $signature = 'schema:dump {--database= : The database connection to use} {--path= : The path where the schema dump file should be stored} {--prune : Delete all existing migration files}'; /** * The console command description. * * @var string */ protected $description = 'Dump the given database schema'; /** * Execute the console command. * * @param \Illuminate\Database\ConnectionResolverInterface $connections * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher * @return void */ public function handle(ConnectionResolverInterface $connections, Dispatcher $dispatcher) { $connection = $connections->connection($database = $this->input->getOption('database')); $this->schemaState($connection)->dump( $connection, $path = $this->path($connection) ); $dispatcher->dispatch(new SchemaDumped($connection, $path)); $info = 'Database schema dumped'; if ($this->option('prune')) { (new Filesystem)->deleteDirectory( $path = database_path('migrations'), $preserve = false ); $info .= ' and pruned'; $dispatcher->dispatch(new MigrationsPruned($connection, $path)); } $this->components->info($info.' successfully.'); } /** * Create a schema state instance for the given connection. * * @param \Illuminate\Database\Connection $connection * @return mixed */ protected function schemaState(Connection $connection) { $migrations = Config::get('database.migrations', 'migrations'); $migrationTable = is_array($migrations) ? ($migrations['table'] ?? 'migrations') : $migrations; return $connection->getSchemaState() ->withMigrationTable($migrationTable) ->handleOutputUsing(function ($type, $buffer) { $this->output->write($buffer); }); } /** * Get the path that the dump should be written to. * * @param \Illuminate\Database\Connection $connection */ protected function path(Connection $connection) { return tap($this->option('path') ?: database_path('schema/'.$connection->getName().'-schema.sql'), function ($path) { (new Filesystem)->ensureDirectoryExists(dirname($path)); }); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 9
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Factories
DIR
-
drwxrwxrwx
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Migrations
DIR
-
drwxrwxrwx
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Seeds
DIR
-
drwxrwxrwx
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DatabaseInspectionCommand.php
1.72 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DbCommand.php
7.26 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DumpCommand.php
2.97 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MonitorCommand.php
3.85 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PruneCommand.php
5.94 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ShowCommand.php
8.95 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ShowModelCommand.php
6.79 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TableCommand.php
8.56 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
WipeCommand.php
2.76 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).