From 9a0a497ced318baebef03cbf01d1ebab715cbdd5 Mon Sep 17 00:00:00 2001 From: trwnh Date: Tue, 13 Aug 2019 02:33:06 -0500 Subject: [PATCH 1/5] Update database.php --- config/database.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/database.php b/config/database.php index fb8136b3e..8d227e0cc 100644 --- a/config/database.php +++ b/config/database.php @@ -109,6 +109,8 @@ return [ 'client' => 'predis', 'default' => [ + 'scheme' => env('REDIS_SCHEME', 'tcp'), + 'path' => env('REDIS_PATH'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), From 1213e65b8cc0d3751910124fce3d545bf6b43ec4 Mon Sep 17 00:00:00 2001 From: trwnh Date: Tue, 13 Aug 2019 02:33:36 -0500 Subject: [PATCH 2/5] Update cache.php --- config/cache.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/cache.php b/config/cache.php index 93190d5bb..f9d09b03f 100644 --- a/config/cache.php +++ b/config/cache.php @@ -73,6 +73,8 @@ return [ 'client' => 'predis', 'default' => [ + 'scheme' => env('REDIS_SCHEME', 'tcp'), + 'path' => env('REDIS_PATH'), 'host' => env('REDIS_HOST', 'localhost'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), From 4ea368ce9b880fca0cf889e016e85d77ae98108f Mon Sep 17 00:00:00 2001 From: trwnh Date: Tue, 13 Aug 2019 02:34:33 -0500 Subject: [PATCH 3/5] Update .env.example --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index f5ed15a93..a0731890f 100644 --- a/.env.example +++ b/.env.example @@ -25,6 +25,7 @@ SESSION_DRIVER=redis SESSION_LIFETIME=120 QUEUE_DRIVER=redis +REDIS_SCHEME=tcp REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 From 962c36d4f6f9e27a964d0409fb9f147269562505 Mon Sep 17 00:00:00 2001 From: trwnh Date: Tue, 13 Aug 2019 02:34:58 -0500 Subject: [PATCH 4/5] Update .env.testing --- .env.testing | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.testing b/.env.testing index 2794527a9..16f147f88 100644 --- a/.env.testing +++ b/.env.testing @@ -25,6 +25,7 @@ SESSION_DRIVER=redis SESSION_LIFETIME=120 QUEUE_DRIVER=redis +REDIS_SCHEME=tcp REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 From a8b63934e4ab6654d7bda6c196a18f35bf3a4e81 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 13 Aug 2019 01:47:15 -0600 Subject: [PATCH 5/5] Update Place model --- app/Place.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/Place.php b/app/Place.php index c7c7d68be..a63c507c5 100644 --- a/app/Place.php +++ b/app/Place.php @@ -7,15 +7,8 @@ use Pixelfed\Snowflake\HasSnowflakePrimary; class Place extends Model { - use HasSnowflakePrimary; + protected $visible = ['id', 'name', 'country', 'slug']; - /** - * Indicates if the IDs are auto-incrementing. - * - * @var bool - */ - public $incrementing = false; - public function url() { return url('/discover/places/' . $this->id . '/' . $this->slug); @@ -30,4 +23,9 @@ class Place extends Model { return $this->posts()->count(); } + + public function statuses() + { + return $this->hasMany(Status::class, 'id', 'place_id'); + } }