Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12870986
UserExternalSource.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
UserExternalSource.php
View Options
<?php
namespace
AuthGrove\Models
;
use
Illuminate\Database\Eloquent\Model
;
class
UserExternalSource
extends
Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected
$table
=
'users_external_sources'
;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected
$fillable
=
[
'source_name'
,
'source_user_id'
,
'user_id'
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected
$hidden
=
[];
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected
$casts
=
[
'user_id'
=>
'integer'
,
];
/**
* Gets fillable but not hidden attributes, plus create/update time.
*
* @return Array
*/
public
function
getAttributes
()
{
$attributes
=
array_diff
(
$this
->
fillable
,
$this
->
hidden
);
$attributes
[]
=
'created_at'
;
$attributes
[]
=
'updated_at'
;
array_unshift
(
$attributes
,
'id'
);
return
$attributes
;
}
/**
* Gets user attached to this source.
*
* @return User
*/
public
function
getUser
()
{
return
User
::
find
(
$this
->
user_id
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 17, 16:04 (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3160046
Default Alt Text
UserExternalSource.php (1 KB)
Attached To
Mode
rGROVE Auth Grove
Attached
Detach File
Event Timeline
Log In to Comment