Skip to content

Instantly share code, notes, and snippets.

@codeInBit
Created November 17, 2017 02:12
Show Gist options
  • Save codeInBit/0fb2a7235352bbc0cdad5f0f3f876942 to your computer and use it in GitHub Desktop.
Save codeInBit/0fb2a7235352bbc0cdad5f0f3f876942 to your computer and use it in GitHub Desktop.
public static function upload(UploadedFile $file)
{
$fileMedia = new static;
$file->name = time().'_'. strtolower( $file->getClientOriginalName() );
Image::make($file)->resize(1360, 760)->save(config('admin.fileUploadDirectory') . $file->name);
// $file->move(config('admin.fileUploadDirectory'), $file->name);
return $file;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment