Monday, March 6, 2017

Undefined property: Sleimanx2\Plastic\PlasticPaginator::$photo_url Laravel

I want when I click on one of the checkboxs it gives me the list of hotels whose price is between 0-49, I do the following function, it works perfectly but I have an error "Undefined property: Sleimanx2\Plastic\PlasticPaginator::$photo_url Laravel"

public function pricefilter(Request $request)
{
    $query = Input::get('query', false);
   $brans = request()->priceFilter;

if(!empty($brans) && !empty($query))
    {

             $product = "";
         foreach($brans  as $data){
           $minMax = explode("-",$data);


          $product[] = Afica::search()
                ->multiMatch(['name','city_hotel'], $query, ['fuzziness' => 'AUTO'])
                ->filter()
                ->range('minrate',['from'=>$minMax[0],'to'=>$minMax[1]])
                ->paginate(25);


     }
      $books = $product;

 }

    else 
    {
           $product = "";
         foreach($brans  as $data){
           $minMax = explode("-",$data);


          $product[] = Afica::search()
                ->filter()
                ->range('minrate',['from'=>$minMax[0],'to'=>$minMax[1]])
                ->paginate(25);


     }
      $books = $product[0];
      for($i=1;$i<count($product);$i++){
        $books=$books->union($product[$i]);

    }

    }

   if ($request->ajax())
    {
            return view('presult', compact('books'));
    } 
    return view('welcome',compact('books'));


}

And In the view :

@foreach($books as $Afica)

        <article class="one-third">
          <figure><a href="#" title=""><img src="}" alt="" style="height: 215px!important;" /></a></figure>

          <div class="details">

            <h3>}
              <span class="stars">

                  <?php 

                  for ($i=1 ; $i<=$Afica->class ; $i++) 
                  {
                  echo ' <i class="material-icons">&#xE838;</i>';
                  }

              ?>
              </span>
            </h3>
            <span class="address">},}  <a href="">Show on map</a></span>
            <span class="rating">}</span>
            <span class="price">Max rate  <em>$ }</em> </span>
            <span class="pricee">Min rate  <em>$ }</em> </span>
            <div class="description">
              <p>}<a href="hotel?query=}">More info</a></p>
            </div>   
            <a href="}" title="Book now" class="gradient-button">Book now</a>
          </div>
        </article><?php $myArray[] = $Afica->id;?>

        <!--//deal-->
        @endforeach

       @endif



via koora et film Tv

Advertisement