mercredi 11 mai 2016

Laravel foreign key with img path

I basically have this:

   foreach ($request->input('images', []) as $imagesData) {
       $images = new ScenesImages($imagesData);
       $images->product()->associate($product);
       $images->save();
   }

This saves correctly in my foreign key the name of the image/s but how do I safe the image path dynamicly here.

If I dd($product);

I get this:

>   #attributes: array:2 [▼
>     "name" => "test"
>     "product_id" => 7   ]

but no img(path)



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire