Mpociot\Teamwork\Commands\MakeTeamwork::handle PHP Метод

handle() публичный Метод

Execute the console command.
public handle ( ) : mixed
Результат mixed
    public function handle()
    {
        $this->createDirectories();
        $this->exportViews();
        if (!$this->option('views')) {
            $this->info('Installed TeamController.');
            file_put_contents(app_path('Http/Controllers/Teamwork/TeamController.php'), $this->compileControllerStub('TeamController'));
            $this->info('Installed TeamMemberController.');
            file_put_contents(app_path('Http/Controllers/Teamwork/TeamMemberController.php'), $this->compileControllerStub('TeamMemberController'));
            $this->info('Installed AuthController.');
            file_put_contents(app_path('Http/Controllers/Teamwork/AuthController.php'), $this->compileControllerStub('AuthController'));
            $this->info('Installed JoinTeamListener');
            file_put_contents(app_path('Listeners/Teamwork/JoinTeamListener.php'), str_replace('{{namespace}}', $this->getAppNamespace(), file_get_contents(__DIR__ . '/../../../stubs/listeners/JoinTeamListener.stub')));
            $this->info('Updated Routes File.');
            file_put_contents(base_path('routes/web.php'), file_get_contents(__DIR__ . '/../../../stubs/routes.stub'), FILE_APPEND);
        }
        $this->comment('Teamwork scaffolding generated successfully!');
    }