From 1b242be3916f57c82da9be278f856dcc9c088077 Mon Sep 17 00:00:00 2001 From: atmonshi Date: Sat, 17 Feb 2024 04:51:16 +0000 Subject: [PATCH] Fix styling --- src/Models/Post.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Models/Post.php b/src/Models/Post.php index 41e5215..894c8c2 100644 --- a/src/Models/Post.php +++ b/src/Models/Post.php @@ -91,11 +91,11 @@ public function statusDesc(): string /** @return BelongsTo */ public function author(): BelongsTo { - // return $this->belongsTo(config('auth.providers.users.model'), 'user_id', 'id'); - // To acocomodate using LDAPRecord ( https://ldaprecord.com/docs/laravel/v3/auth/database/configuration#introduction ) the belongs to relation needs to look back at the database model rather than the LDAP model. The LDAP model itself doesn't have provision for + // return $this->belongsTo(config('auth.providers.users.model'), 'user_id', 'id'); + // To acocomodate using LDAPRecord ( https://ldaprecord.com/docs/laravel/v3/auth/database/configuration#introduction ) the belongs to relation needs to look back at the database model rather than the LDAP model. The LDAP model itself doesn't have provision for // the belongsTo relationship and instead gives an error from the Spatie permissions side: LDAP RECORD with Spatie Permissions gives error "The LDAP connection [mysql] does not exist." - return $this->belongsTo( !empty(config('auth.providers.users.database.model')) ? config('auth.providers.users.database.model') : config('auth.providers.users.model'), 'user_id', 'id'); - + return $this->belongsTo(! empty(config('auth.providers.users.database.model')) ? config('auth.providers.users.database.model') : config('auth.providers.users.model'), 'user_id', 'id'); + } /** @return BelongsTo */