Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected $fillable = [
- 'name',
- 'caption',
- 'path'
- ];
- public static function create(array $attributes, $image, $extension, $folder = null)
- {
- die("It died.");
- $attributes['path'] = FileNameGenerator::getNewFilePath($extension);
- Storage::disk('s3')->put( $folder . $attributes['path'], File::get($image));
- $model = static::query()->create($attributes);
- return $model;
- }
- Auth::user()->image()->create([], $image, $extension, config('app.profile_pictures_path'));
Add Comment
Please, Sign In to add comment