xxxxxxxxxx
<?php
// Assuming you are in the root directory of your Laravel project
// Include the necessary bootstrap file
require __DIR__.'/vendor/autoload.php';
// Create an instance of the Artisan console application
$app = require_once __DIR__.'/bootstrap/app.php';
$app->useEnvironmentPath(__DIR__);
// Set the application base path
$app->bind('path.base', function() {
return __DIR__;
});
// Run the "migrate:down" command
$status = \Illuminate\Support\Facades\Artisan::call('migrate:down');
// Check the command's output/status if necessary
$output = \Illuminate\Support\Facades\Artisan::output();
// Display the command's output/status
echo $output;