2017 © Pedro Peláez
 

library nana-laravel

Laravel package for ksmz/nana

image

ksmz/nana-laravel

Laravel package for ksmz/nana

  • Wednesday, July 4, 2018
  • by amatsuka
  • Repository
  • 1 Watchers
  • 0 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

nana-laravel

Laravel package for ksmz/nana. Documentation is still incomplete., (*1)

Install

  • composer require ksmz/nana-laravel
  • artisan vendor:publish --provider "ksmz\NanaLaravel\NanaServiceProvider"

Differences

This package provides a more appropriate integration with regards to manging the Sink., (*2)

Make sure you're bringing in the right facades/classes. The underlying package also provides a facade-like static proxy and basic sink support., (*3)

ksmz\Nana ksmz\Nana-Laravel
Fetch LaravelFetch
Consume LaravelConsume
Sink NanaManager (Typehintable, Registered in container)
Nana Facades/Nana (Actual facade, aliased to \Nana as well)

Of course, if you have stuff registered in the sink through the config file (config/nana.php), you can't use Sink since it doesn't belong to this package., (*4)

That being said, nothing is stopping you from using the base package. If you're making super simple requests, use ksmz\Nana\Nana.php., (*5)

Features

  • Sinks can be pre-configured in config/.
  • Save responses directly to your existing Laravel/Flysystem's storage drivers

Configuration

You should see a nana.php in your configuration directory. These are where you should configure your sinks. They are functionally identical to the Sink found in the base package., (*6)

As said in the base package's Sink documentation, the Sink API + configuration is inspired by Laravel's filesystems., (*7)

Example Configuration

return [
    'default' => env('NANA_FAUCET', 'default'),
    'faucets' => [

        /*
        |--------------------------------------------------------------------------
        | Guzzle Options
        |--------------------------------------------------------------------------
        |
        | Here you may configure as many faucets as you wish. <guzzle_config> is
        | passed directly to Guzzle's Request Options.
        |
        | See http://docs.guzzlephp.org/en/stable/request-options.html for more info.
        */
        'default' => [

            'default_disk'  => env('FILESYSTEM_DRIVER', 'local'),
            'guzzle_config' => [
                'http_errors' => false,
                'headers'     => [
                    'User-Agent' => 'nana/1.0',
                    'Accept'     => 'application/json',
                ],
            ],
            ...
];

Examples


The Versions

04/07 2018

dev-master

9999999-dev

Laravel package for ksmz/nana

  Sources   Download

BSD-2-Clause

The Requires

 

by ksmz

04/07 2018

v0.1

0.1.0.0

Laravel package for ksmz/nana

  Sources   Download

BSD-2-Clause

The Requires

 

by ksmz

31/05 2018

v0.0.1

0.0.1.0

Laravel package for ksmz/nana

  Sources   Download

BSD-2-Clause

The Requires

 

by ksmz