for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Social extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'social_logins';
* Indicates if the model should be timestamped.
* @var bool
public $timestamps = true;
* The attributes that are not mass assignable.
* @var array
protected $guarded = [
'id',
];
* The attributes that are hidden.
protected $hidden = [];
* The attributes that should be mutated to dates.
protected $dates = [
'created_at',
'updated_at',
* The attributes that are mass assignable.
protected $fillable = [
'user_id',
'provider',
'social_id',
* The attributes that should be cast to native types.
protected $casts = [
'id' => 'integer',
'user_id' => 'integer',
'provider' => 'string',
'social_id' => 'string',
* Get the user that owns the social.
public function user()
return $this->belongsTo(\App\Models\User::class);
}