lundi 21 mai 2018

Laravel- redirect with variable and display it in the view file

I have a controller

 public function store(Request $request)
{if ($request->input('asc')){
                $image = PropertyUser::where('user_id', '=', Auth::user()->id)->get();
                foreach($image as $property)
                {
                    $id = $property->property_id;
                }
                $image_ = Image::where('property_id', $id)->sortBy('description')->get();
                return redirect('settings/photos');

How can i redirect with the $image_ variable and display it in my view file

@foreach ($image_ as $images)
            <div class="image-warp"><img src=""
                                         style="width:100px;height:100px;"><br/><span style="color: #1b1e21"></span>
            </div>
        @endforeach



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire