/home/techb158/ileadtechnology.com/SSM/app/Repositories
NameSizeModeActions
academic/-0755rm
auth/-0755rm
calendar/-0755rm
communication/-0755rm
configuration/-0755rm
employee/-0755rm
exam/-0755rm
finance/-0755rm
frontend/-0755rm
institute/-0755rm
inventory/-0755rm
library/-0755rm
post/-0755rm
reception/-0755rm
resource/-0755rm
student/-0755rm
transport/-0755rm
upload/-0755rm
utility/-0755rm
.DS_Store102440644editdlrm
HomeRepository.php78640644editdlrm
TagRepository.php16500644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/app/Repositories/TagRepository.php (1650B)
tag = $tag; $this->taggable = $taggable; } /** * Get all tags * * @param array $options * @return Array */ public function getAll($options = array()) { $tags = $this->tag->filterByType(array_get($options, 'type'))->orderBy('name','asc')->get(); return new TagCollection($tags); } /** * Create new tags * @param string $type * @param array $tags * @return void */ public function create($type, $tags = array()) { $all_tags = $this->tag->filterByType($type)->get()->pluck('slug')->all(); $new_tags = array_diff(array_values(array_unique($tags)), $all_tags); foreach ($tags as $tag) { $new_tag = $this->tag->firstOrNew(['slug' => $tag, 'type' => $type]); $new_tag->name = toWord($tag); $new_tag->save(); } return $this->getAll(['type' => $type]); } /** * Delete taggable * @param string $type * @param array $taggable_ids * @return void */ public function delete($type, $taggable_ids = array()) { $this->taggable->where('taggable_type', $type)->whereIn('taggable_id', $taggable_ids)->delete(); } }