Code Monkey home page Code Monkey logo

laravel-phpredis's Introduction

laravel-phpredis

laravel 5.1

PhpRedis The phpredis extension provides an API for communicating with the Redis key-value store. It is released under the PHP License, version 3.01. This code has been developed and maintained by Owlient from November 2009 to March 2011.

Requirements

PHP 5.4+
Laravel 5.x

Installation

	    
"require": {
    "kingnet/laravel-phpredis":"dev-master"
}

Add the PhpRedisServiceProvider to config/app.php (comment out built-in RedisServiceProvider):

// Illuminate\Redis\RedisServiceProvider::class,
//phpredis provider
    KingNet\PhpRedis\PhpRedisServiceProvider::class,

The default Facade alias conflicts with the Redis class provided by PhpRedis. To fix this, rename the alias in config/app.php:

'PhpRedis'  => KingNet\PhpRedis\Facede::class,

Finally run composer update to update and install everything.

Configuration

Just use php artisan vendor:publish and a phpredis.php file will be created in your config directory.

Usage

use PhpRedis;


class PhpredisController extends Controller
{
  
    public function test()
    {

        PhpRedis::set('myname','kingnet');
        dd(PhpRedis::get('myname'));

    }

    
}

License

This is free software distributed under the terms of the MIT license.

Contribution guidelines

Please report any issue you find in the issues page.
Pull requests are welcome.

laravel-phpredis's People

Contributors

clovercui avatar jinguoxing avatar

Watchers

 avatar  avatar

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.