If we look at your code we see that your $content->image call is called for every image. This means that it will override that. What you want here is a relationship between content and images. You can of course save it as an array in your database, but then you will have a hard time removing one image for example.
Here is an example with the relationship set up
$content->fill($this->getSafeInput($request));
$content->save();
if($request->hasFile('image')) {
foreach($request->file('image') as $image) {
$destinationPath = 'content_images/';
$filename = $image->getClientOriginalName();
$image->move($destinationPath, $filename);
$image = new ContentImage([
'path' => $filename,
]);
$content->images()->save($image);
}
}
Now that we have this working we also need to create the relationship. For the you need an extra table in your database and also an extra model.
// create_content_image_table
Schema::create('content_image', function (Blueprint $table) {
$table->increments('id');
$table->integer('content_id')->unsigned();
$table->string('path');
$table->timestamps();
});
// Content.php
public function images()
{
return $this->hasMany(ContentImage::class);
}
// ContentImage.php
public function content()
{
return $this->belongsTo(Content::class);
}
For more information on relationships read this: https://laravel.com/docs/5.5/eloquent-relationships#one-to-many
Let me know if you have more questions ;)