<?php
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);

echo "<pre>";
echo "Running migrations...\n";
$kernel->call('migrate --force');

echo "Running seeders...\n";
$kernel->call('db:seed --force');

echo "Creating storage link...\n";
$kernel->call('storage:link');

echo "Setup complete! Delete setup.php and remove /setup route.";
echo "</pre>";