get rendering View as object response Laravel

> Be assumption that we have a dynamic HTML which use to replace part of in defined HTML page.

<div class="row">
    @foreach($sitelists as $item)
        <div class="col-lg-4 col-md-12"> <a href="javascript:void(0);" class="utf_listing_item-container" data-marker-id="1">
                <div class="utf_listing_item"> <img src="{{ sizeof($item->thumbnail) > 0 ? $item->thumbnail[0]['thumbnail'] : '' }}" alt="">
                    <span class="tag"><i class="im im-icon-Chef-Hat"></i> {{ $item->category }}</span>
                    <span class="utf_open_now">Hoạt Động</span>
                    <div class="utf_listing_item_content">
                        <div class="utf_listing_prige_block">
                            <span class="utf_meta_listing_price"><i class="fa fa-tag"></i> {{ $item->minprice }} - {{ $item->maxprice }}</span>
                            <span class="utp_approve_item"><i class="utf_approve_listing"></i></span>
                        <h3>{{ $item->name }}</h3>

> We will wrap into into resources/views/append/sitelist.blade.php file into view folder.

> In your custom TestController as below:

public function extra(Request $request) {
    $sitelists = $this->repository->findWhere([
        ['slug','LIKE','%' . $this->slugify($request->query('q')) . '%']
    return view('append.sitelist')
        ->with('sitelists', $sitelists)
get response object JSON in REST
You need to login to do this manipulation!