Giter Club home page Giter Club logo

skippy's Introduction

Skippy - The lightweight PHP AMQP Messager

Getting started

Installation

You can install this package via composer using this command:

composer require krenor/skippy

Laravel 5.2+

  1. Register the Service Provider
// config/app.php
'providers' => [
    ...
    Skippy\Providers\SkippyServiceProvider::class,
]
  1. Publish the basic configuration

php artisan vendor:publish --provider="Skippy\Providers\SkippyServiceProvider"

  1. Register an alias (optional)
// config/app.php
'aliases' => [
    ...
    'Skippy'   => Skippy\Facades\Skippy::class,
],

Lumen 5.2+

  1. Register the Service Provider
// bootstrap/app.php
$app->register(Skippy\Providers\SkippyServiceProvider::class);
  1. Add a configuration file at config/skippy.php

You can copy the content of the base configuration file and adjust it to your needs.

  1. Register the configuration to be loaded
// bootstrap/app.php
$app->configure('skippy');
  1. Register an alias (optional)
// bootstrap/app.php
class_alias(Skippy\Skippy::class, 'Skippy');

Examples

$profile = $this->createMagicalProfile();

$message = [
    'id'      => Uuid::generate(4)->string,
    'cids'    => [
        Uuid::generate(4)->string,
    ],
    'type'    => 'new-magical-profile',
    'version' => '1.0.0',
    'body'    => $profile,
];

Skippy::send($message)->publish('magical-profile-created');

Contributing

Pull Requests

  • PSR-2 Coding Standard

  • Document any changes - Make sure the README.md and any other relevant documentation are kept up-to-date.

  • Create feature branches - Use git checkout -b my-new-feature

  • One pull request per feature - If you want to do more than one thing, send multiple pull requests.

  • Send coherent history - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.

License

skippy is distributed under the terms of the MIT license

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.