コード例 #1
0
ファイル: UserProperties.php プロジェクト: artemsk/veer-core
 protected function filterCommunications($type, $filters)
 {
     if (!in_array($type, array("type", "url", "order"))) {
         return $this->buildFilterWithElementsQuery($filters, "\\Veer\\Models\\Communication");
     }
     if ($type == "order") {
         return \Veer\Models\Communication::where('elements_type', '=', elements($type))->where('elements_id', '=', head($filters));
     }
     return \Veer\Models\Communication::where($type, '=', array_get($filters, $type, 0));
 }
コード例 #2
0
ファイル: Communication.php プロジェクト: artemsk/veer-core
 public function delete($id)
 {
     \Veer\Models\Communication::where('id', '=', $id)->delete();
     event('veer.message.center', trans('veeradmin.' . $this->type . '.delete'));
     return $this;
 }