datatable.directory codebase https://datatable.directory/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
datatable.directory/app/SocialLogin/UserStore.php

27 lines
479 B

<?php namespace AdamWathan\EloquentOAuth;
class UserStore
{
protected $model;
public function __construct($model)
{
$this->model = $model;
}
public function create()
{
$user = new $this->model;
return $user;
}
public function store($user)
{
return $user->save();
}
public function findByIdentity($identity)
{
return $identity->belongsTo($this->model, 'user_id')->firstOrFail();
}
}