mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-14 00:02:05 -04:00
31 lines
632 B
PHP
31 lines
632 B
PHP
<?php
|
|
|
|
namespace App\View\Components;
|
|
|
|
use App\Models\SearchTerm;
|
|
use Illuminate\View\Component;
|
|
|
|
class PopularSearchComponent extends Component
|
|
{
|
|
/**
|
|
* Create a new component instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Get the view / contents that represent the component.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View|\Closure|string
|
|
*/
|
|
public function render()
|
|
{
|
|
$search_items = SearchTerm::latest()->take(30)->get();
|
|
return view(theme('components.popular-search-component'),compact('search_items'));
|
|
}
|
|
}
|