Created
March 24, 2015 17:59
-
-
Save yoelfme/715ee9acea7d516e4509 to your computer and use it in GitHub Desktop.
Create record with files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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