binarycabin/laravel-image

Simple integration for image uploading and linking

1.0.0 2017-11-20 16:53 UTC

This package is auto-updated.

Last update: 2024-11-06 10:41:26 UTC


README

Simple integration for image uploading and linking

Example


public static function create(array $attributes = [])
    {
        $query = static::query();
        $model = $query->create($attributes);
        $model->postSave($attributes);
        return $model;
    }

    public function update(array $attributes = [], array $options = [])
    {
        $updateResponse = parent::update($attributes, $options);
        $this->postSave($attributes);
        return $updateResponse;
    }

    public function postSave(array $attributes = []){
        $this->attributesUpdateImage($attributes);
    }