Exemplo n.º 1
0
 /**
  * Log activity in an Eloquent model.
  *
  * @param string $text
  * @param $userId
  * @param array  $attributes
  *
  * @return bool
  */
 public function log($action, $name, $type, $userId = '', $attributes = [])
 {
     Activity::create(['action' => $action, 'name' => $name, 'type' => $type, 'user_id' => $userId == '' ? null : $userId, 'ip_address' => $attributes['ipAddress']]);
     return true;
 }
Exemplo n.º 2
0
 /**
  * Log activity in an Eloquent model.
  *
  * @param string $text
  * @param $userId
  * @param array  $attributes
  *
  * @return bool
  */
 public function log($text, $userId = '', $attributes = [])
 {
     Activity::create(['text' => $text, 'user_id' => $userId == '' ? null : $userId, 'ip_address' => $attributes['ipAddress']]);
     return true;
 }
Exemplo n.º 3
0
 /**
  * Log activity in an Eloquent model.
  *
  * @param string $text
  * @param $userId
  * @param array  $attributes
  *
  * @return bool
  */
 public function log($text, $userId = '', $attributes = [])
 {
     Activity::create(['text' => $text, 'user_id' => $userId == '' ? null : $userId, 'model_id' => isset($attributes['model_id']) ? $attributes['model_id'] : null, 'data_id' => isset($attributes['data_id']) ? $attributes['data_id'] : null, 'ip_address' => $attributes['ipAddress']]);
     return true;
 }