aboutsummaryrefslogtreecommitdiffhomepage
path: root/infrastructure/Console/Commands/StartServerCommand.php
blob: 03ec6f9d0ab3b31534eb39a9c9c46c6e1f024641 (plain) (blame)
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
<?php

namespace Infrastructure\Console\Commands;

use Illuminate\Console\Command;

class StartServerCommand extends Command
{
    /**
     * The console command name.
     *
     * @var string
     */
    protected $name = 'server';

    /**
     * Execute the console command.
     *
     * @return void
     */
    public function fire()
    {
        $this->line('Starting server...');
        if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
            exec("wsl bash infrastructure/Console/Commands/StartServer.sh");
        } else {
            exec("bash infrastructure/Console/Commands/StartServer.sh");
        }
    }
}