Initial integration with Quicken (Intuit API), rework oauth tables, update/test google login
This commit is contained in:
31
app/Models/UserOauth.php
Normal file
31
app/Models/UserOauth.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use App\Traits\SiteID;
|
||||
|
||||
class UserOauth extends Model
|
||||
{
|
||||
use SiteID;
|
||||
|
||||
protected $table = 'user_oauth';
|
||||
|
||||
protected $casts = [
|
||||
'oauth_data'=>'json',
|
||||
];
|
||||
|
||||
public function User()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a link token to use when validating account.
|
||||
*/
|
||||
public function getLinkTokenAttribute(): string
|
||||
{
|
||||
return strtoupper(substr(md5($this->id.$this->date_last),0,8));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user