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-05-06 09:36:45 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);
    }