Owl\Repositories\Eloquent\ImageRepository::createImage PHP 메소드

createImage() 공개 메소드

Create a new image.
public createImage ( $img ) : Illuminate\Database\Eloquent\Model
리턴 Illuminate\Database\Eloquent\Model
    public function createImage($img)
    {
        $image = $this->image->newInstance();
        $image->alt_text = $img->alt_text;
        $image->external_path = $img->external_path;
        $image->external_name = $img->external_name;
        $image->save();
        return $image;
    }