Laravel5 Antwort "Die HTTP-status-code "1" ist nicht gültig."

Ich habe große aber einfache join-Abfrage für große Daten. Wenn ich drucken Abfrage-Ergebnis dd() oder var_dump() ich bekomme, aber wenn ich pass-Ergebnis-Daten oder redirect bekomme ich eine Ausnahme, die

"Der HTTP-status-code "1" ist nicht gültig".

Hier ist action-code:

public function postSearch(Request $request)
{
    $min_price  = !empty($request['min_price']) ? $request['min_price'] : 500;
    $max_price  = !empty($request['max_price']) ? $request['max_price'] : 50000000000;

    $properties = DB::table('properties')
                ->join('addresses', function($join) {
                    $join->on('properties.id', '=', 'addresses.property_id');
                })
                ->where('status', '=', 1)
                ->where('category', '=', $request['search_category'])
                ->where('type', '=', $request['contract'])
                ->where('city', '=', $request['search_city'])
                ->where('area', '=', $request['property_area'])
                ->where('bed_room', '=', $request['search_bedroom'])
                ->where('bath_room', '=', $request['bath_room'])
                ->whereBetween('price', [$min_price, $max_price])
                ->orderBy('properties.updated_at', 'desc')
                ->paginate(15);
    try {
        if(!empty($properties))
        {
            return Redirect::to('property/search', compact('properties'));
        }
        else
        {
            return Redirect::to('/')->with('message', PropertyHelper::formatMessage(trans('property.property_not_found'), 'danger'));
        }
    }
    catch(\Exception $ex) {
        dd($ex->getMessage());
    }

}
InformationsquelleAutor | 2015-04-10
Schreibe einen Kommentar