rockbuzz/lara-cw

This package is abandoned and no longer maintained. No replacement package was suggested.

Api Cloudways

v1.0.6 2022-02-05 17:28 UTC

This package is auto-updated.

Last update: 2023-05-30 09:26:02 UTC


README

Api Cloudways

badge.svg

Requirements

PHP >=7.3

Install

$ composer require rockbuzz/lara-cw

Usage

.env

 // Turn auto deploy on or off, default: true
CW_ENABLED

// Define the deployment environment, default: staging
CW_ENV=

// Define the uri that webhooks will use, default: _deploy
CW_DEPLOY_URI=

// Set authentication and repository values
CW_API_KEY=
CW_API_URL=
CW_EMAIL=
CW_SERVER_ID=
CW_APP_ID=
CW_DEPLOY_PATH=
CW_GIT_URL=
CW_BRANCH_NAME=

add uri in csrf middleware

<?php

namespace App\Http\Middleware;

use Symfony\Component\HttpFoundation\Cookie;
use Illuminate\Contracts\Support\Responsable;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
use Illuminate\Contracts\Encryption\Encrypter;
use Illuminate\Contracts\Foundation\Application;

class VerifyCsrfToken extends Middleware
{
    //... 

    public function __construct(Application $app, Encrypter $encrypter)
    {
        parent::__construct($app, $encrypter);

        $this->except = array_merge($this->except, [config('cw.routes.index.uri')]);
    }

    //...
}

Optional

$ php artisan vendor:publish --provider="Rockbuzz\LaraCW\ServiceProvider" --tag="config"

License

The Lara CW is open-sourced software licensed under the MIT license.