Cartalyst\Sentinel\Reminders\IlluminateReminderRepository::create PHP Метод

create() публичный Метод

{@inheritDoc}
public create ( Cartalyst\Sentinel\Users\UserInterface $user )
$user Cartalyst\Sentinel\Users\UserInterface
    public function create(UserInterface $user)
    {
        $reminder = $this->createModel();
        $code = $this->generateReminderCode();
        $reminder->fill(['code' => $code, 'completed' => false]);
        $reminder->user_id = $user->getUserId();
        $reminder->save();
        return $reminder;
    }

Usage Example

Пример #1
0
 /**
  * {@inheritDoc}
  *
  * @static 
  */
 public static function create($user)
 {
     return \Cartalyst\Sentinel\Reminders\IlluminateReminderRepository::create($user);
 }