-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
38 lines (32 loc) · 992 Bytes
/
Copy pathstart.bat
File metadata and controls
38 lines (32 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@echo off
chcp 65001 >nul
cd /d "%~dp0"
:: Проверяем наличие PHP
where php >nul 2>nul
if %errorlevel% neq 0 (
echo [ОШИБКА] PHP не найден!
pause
exit /b 1
)
:: Проверяем artisan
if not exist artisan (
echo [ОШИБКА] Файл artisan не найден.
pause
exit /b 1
)
:: Создаём БД если нет
if not exist database\database.sqlite (
copy nul database\database.sqlite >nul
php artisan migrate --force
php artisan db:seed --force
)
:: Останавливаем старые процессы PHP (если были)
taskkill /f /im php.exe >nul 2>nul
timeout /t 1 >nul
:: Запускаем всё в скрытых окнах
start "" /b /min cmd /c "php artisan queue:work --sleep=3 --tries=3 --timeout=600"
start "" /b /min cmd /c "php artisan schedule:work"
start "" /b /min cmd /c "php artisan serve"
:: Открываем браузер
timeout /t 2 >nul
start "" http://localhost:8000