ERROR:
Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension
I put this code on my cache.php
'default' => env('CACHE_DRIVER', 'redis'),
And those code in my controller:
$data['posts'] = cache('posts',function(){
Post::with('user')
->select('title', 'created_at', 'user_id', 'thumbnail_path', 'content')
->orderBy('created_at','desc')
->take(50)
->get();
});