Skip to content

Instantly share code, notes, and snippets.

@yoelfme
Created March 24, 2015 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoelfme/715ee9acea7d516e4509 to your computer and use it in GitHub Desktop.
Save yoelfme/715ee9acea7d516e4509 to your computer and use it in GitHub Desktop.
Create record with files
if ($validator->passes())
{
$record = $this->repo->create($data);
$image = UploadX::uploadFile($request->file('image'),'notices',$record->id);
$record->image = $image['url'];
$record->save();
return compact('success','message','record');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment