<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Artisan;

Route::get('/seed-role', function () {
   Artisan::call('db:seed --class=RoleSeeder');
   Artisan::call('db:seed --class=DatabaseSeeder');
   die('seed');
});

Route::get('/command', function () {
   Artisan::call('migrate', ['--force' => true]);
   die("migrateok");
   //    $result = Artisan::output();
   //    return response($result);
});

Route::get('/reset-pv', function () {
   Artisan::call('app:reset-pv-command');
   die("ok");
});

Route::get('/', function () {
   return view('welcome');
});

Route::get('/relink-storage', function () {
   Artisan::call('storage:link');
   die("Storage linked");
});
