PagesController.php
721 Bytes
<?php
namespace App\Http\Controllers;
use App\Models\pages;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redis;
class PagesController extends Controller
{
public function pages(pages $pages) {
$page = pages::query()->where('slug', $pages->slug)->first();
print_r($page);
}
public function redis() {
$redis = Redis::connection();
$redis->set('User:CompanyName', 'РЕКАМОРЕ');
$id = 1;
//dd(Redis::get('MyVar'));
$redis->command('rpush', array("Сообщение1"));
$redis->command('rpush', array("Сообщение2"));
$values = $redis->command('lrange', array("mylist", 0, 1));
dd($values);
}
}