Fenos\Notifynder\Contracts\NotifynderGroupDB::create PHP Method

create() public method

Create a new group.
public create ( $name ) : Model | static
$name
return Illuminate\Database\Eloquent\Model | static
    public function create($name);

Usage Example

Example #1
0
 /**
  * Add a group in the db
  *
  * @param $name
  * @throws InvalidArgumentException
  * @return \Illuminate\Database\Eloquent\Model|static
  */
 public function addGroup($name)
 {
     if ($this->isStringWithDots($name)) {
         return $this->groupRepo->create($name);
     }
     $error = "The name must be a string with dots as namespaces";
     throw new InvalidArgumentException($error);
 }
All Usage Examples Of Fenos\Notifynder\Contracts\NotifynderGroupDB::create