public function tags() { $output = new questions(); $tag = $output::select('title')->get(); $getTag = tags::get_tag($tag); return view('tags')->with('tag', $getTag); }
$string = strip_tags($value->description); if (strlen($string) > 45) { // truncate string $stringCut = substr($string, 0, 45); // for making sure it ends in a word so assassinate doesn't become ass... $string = substr($stringCut, 0, strrpos($stringCut, ' ')) . '<span> ... Click on Question to Read More<span>'; echo $string; } else { echo $value->description; } ?> </p> <!-- Start of creating Tags for each question --> <?php $tag = tags::get_questiontag($value->title); ?> <!-- ! END of creating Tags for each question --> @if($tag != null) @foreach ($tag as $value) <a href="tag/{{ $value }}" class="btn btn-default">{{ $value }}</a> @endforeach @endif <hr> @endforeach @endif </div> </div> </div>