# Laravel



Requirements

Ensure that these basic requirements are met:

  • Php 7.4 or higher
  • Laravel 6.0 or higher

Guide

You can install the package via composer:

composer require techies-africa/devpilot_laravel
Copy

The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:

'providers' => [ // ... TechiesAfrica\Devpilot\Providers\DevpilotServiceProvider::class, ];
Copy

You can also add the alias to the list of class aliases right after the list of providers for shorter imports:

'aliases' => [ // ... "Devpilot" => TechiesAfrica\Devpilot\Providers\DevpilotServiceProvider::class, ];
Copy

You`re almost done. Run the following command on your terminal to install the necessary configurations:

php artisan devpilot:install
Copy

The following files and directories would be generate once this command completes running:

  • config/devpilot.php (File)
    This file contains the default configurations for devpilot. You are free to customize it to suit your needs.
  • app/Http/Middleware/Devpilot/ActivityTracker/TrackerMiddleware.php (File)
    This file contains the default middleware setup use the activity tracking feature. If you wish to enable activity tracking, ensure you have modified this file to suit your use case and register the middleware in the app/Http/Kernel.php file.
    You would also need to add DEVPILOT_ENABLE_ACTIVITY_TRACKING to your .env and set the value to true or false as necessary.
  • .devpilot (Directory)
    This directory is contains files and subdirectories required by devpilot to perform operations like deployments, script commands, modifying remote .env files, .etc....

To complete the installation, add these to your .env file and set the right values:

DEVPILOT_BASE_URL="https://devpilot.io/api/v1"
DEVPILOT_DEFAULT_BRANCH="master"
DEVPILOT_LOG_CHANNEL="stack"
DEVPILOT_ENABLE_DEPLOYMENT=true
DEVPILOT_ENABLE_ACTIVITY_TRACKING=true
DEVPILOT_USER_TOKEN="******"
DEVPILOT_APP_KEY="********"
DEVPILOT_APP_SECRET="*********"
Copy
Now you`re all set to use Devpilot. To deploy your first app, follow te steps below:
  • 1. Create or login to your devpilot account.
  • 2. Create a workspace or select an existing one.
  • 3. Create a Server. This server could be a shared hosting server or VPS server where you would like to deploy your app to.Ensure that Devpilot is able to connect successfully via SSH.
  • 4. Create a project or select an existing one.
  • 5. Create an app or select an existing one.
  • 6. Click on the Deployment tab Configure your app.
  • 7. Click on the Deploy Now button on the top right of the Deployments page to start the deployment process.
  • 8. Remember to copy Key and Secret and set them in your .env file to enable your deploy from terminal.