Download the PHP package patrolserver/patrol-laravel without Composer

On this page you can find all versions of the php package patrolserver/patrol-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package patrol-laravel

Laravel PatrolServer

A Laravel 4/5 package that integrates the PatrolServer PHP SDK in your project.

Requirements

PHP 5.3.3 and later.

Laravel 5.x.

Installation

You can install the package using Composer. You can install it by running this command in your root Laravel folder:

Laravel

The package provides a facade for easy integration.

Simply add the PatrolServer\Patrol\PatrolServiceProvider provider to the providers array in config/app.php.

And add the Patrol alias to access the facade:

Config file

You have to enter the API key and secret in the config file. To publish this file:

When the config is succesfully published, a file named patrol.php will be available in the config folder of your application, you can then enter your API credentials and various other options in this config file.

Examples

SDK

You can access your data with the Patrol facade, which is a wrapper function for the SDK object. The available options and more information can be found at the PatrolServer API Documentation page.

Webhook

Webhooks are real time events to alert you whenever an event occurs in PatrolServer. For example, your server finished scanning and has new issues. A webhook will be triggered and as a developer, you can now interact based on this new information.

In your routes.php file, add the following rule:

In your controller, you can now define the webhook function. This is a quick example on how to use the SDK:

Auto-update Laravel dependencies

This Laravel package provides an easy method to update your Laravel dependencies when they become outdated. PatrolServer will send a command to your Laravel installation the moment packages become outdated and will execute the composer update command in your root folder.

1. Run the command through a cronjob on a daily basis

The package contains a command to send all the installed Laravel dependencies to PatrolServer by simply running php artisan patrol:run in the terminal. If you have a cronjob running which, powers the Scheduler, all you have to do is add the following line to schedule function in your Kernel file.

2. Enable default webhooks

Open the config file and set the enable_webhooks to true. This will enable the URL endpoint (http://mywebsite.com/patrolserver/webhook), which contains the auto update code.

3. Add the endpoint to your account

Login to https://app.patrolserver.com, and navigate to the API page. Your webhook URL will be in the format of http://mywebsite.com/patrolserver/webhook. Add your URL to the webhook section and you're good to go.

Once you configured the auto updating correctly, the following events will happen: once a day, at midnight, your server will send the software packages and their versions to the PatrolServer scanner. Once the server is scanned, a webhook will be triggered to your patrolserver/webhook URL and when packages are outdated, the package will trigger composer to update these.

Analytics


All versions of patrol-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
patrolserver/patrolsdk-php Version ~1.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package patrolserver/patrol-laravel contains the following files

Loading the files please wait ....