]> BookStack Code Mirror - bookstack/blob - app/Auth/SocialAccount.php
do some cleanup and add doc
[bookstack] / app / Auth / SocialAccount.php
1 <?php
2
3 namespace BookStack\Auth;
4
5 use BookStack\Interfaces\Loggable;
6 use BookStack\Model;
7
8 /**
9  * Class SocialAccount.
10  *
11  * @property string $driver
12  * @property User   $user
13  */
14 class SocialAccount extends Model implements Loggable
15 {
16     protected $fillable = ['user_id', 'driver', 'driver_id', 'timestamps'];
17
18     public function user()
19     {
20         return $this->belongsTo(User::class);
21     }
22
23     /**
24      * {@inheritdoc}
25      */
26     public function logDescriptor(): string
27     {
28         return "{$this->driver}; {$this->user->logDescriptor()}";
29     }
30 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.