public function push($type, $name, $value)
    {
        $typeModel = NotificationTypes::where('name', $type)->first();
        if (is_null($typeModel)) {
            return false;
        }
        $tId   = $typeModel->id;
        $model = $this->makeModel()->getModel()->newInstance([
            'type_id' => $tId,
            'name'    => $name,
            'value'   => $value
        ]);
        $model->save();
        return $model;
    }
public function push($type, $name, $value)
    {
        $typeModel = NotificationTypes::where('name', $type)->first();
        if (is_null($typeModel)) {
            return false;
        }
        $tId   = $typeModel->id;
        $model = $this->makeModel()->getModel()->newInstance([
            'type_id' => $tId,
            'name'    => $name,
            'value'   => $value
        ]);
        $model->save();
        return $model;
    }
public function push ( $ type , $ name , $ value ) { $ typeModel = NotificationTypes :: where ( 'name' , $ type ) -> first ( ) ; if ( is_null ( $ typeModel ) ) { return false ; } $ tId = $ typeModel -> id ; $ model = $ this -> makeModel ( ) -> getModel ( ) -> newInstance ( [ 'type_id' => $ tId , 'name' => $ name , 'value' => $ value ] ) ; $ model -> save ( ) ; return $ model ; }
push notification to database

@param String $type
@param String $name
@param array $value
@return boolean
push notification to database