mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-01 13:21:37 +08:00
f77236aa38
* Apply Laravel coding style * Shift bindings * Shift core files * Shift to Throwable * Add laravel/ui dependency * Shift Eloquent methods * Shift config files * Shift Laravel dependencies * Shift cleanup * Shift test config and references * Applied styleci changes * Applied fixes post shift to laravel 7 Co-authored-by: Shift <shift@laravelshift.com>
31 lines
560 B
PHP
31 lines
560 B
PHP
<?php
|
|
|
|
namespace BookStack\Auth;
|
|
|
|
use BookStack\Interfaces\Loggable;
|
|
use BookStack\Model;
|
|
|
|
/**
|
|
* Class SocialAccount.
|
|
*
|
|
* @property string $driver
|
|
* @property User $user
|
|
*/
|
|
class SocialAccount extends Model implements Loggable
|
|
{
|
|
protected $fillable = ['user_id', 'driver', 'driver_id', 'timestamps'];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function logDescriptor(): string
|
|
{
|
|
return "{$this->driver}; {$this->user->logDescriptor()}";
|
|
}
|
|
}
|