Skip to content

Instantly share code, notes, and snippets.

@vespakoen
Last active December 12, 2015 02:18
Show Gist options
  • Save vespakoen/4697661 to your computer and use it in GitHub Desktop.
Save vespakoen/4697661 to your computer and use it in GitHub Desktop.
public function action_objectinfos($id)
{
$asso = Asso::find($id);
if(Auth::guest()){
return Redirect::back();
}
elseif(Auth::user()->id == $asso->user_id){
$asso->fill(array(
'infos'=>Input::get('value'),
));
}
else{
return Redirect::back();
}
if($asso->save())
{
Session::flash('success','Modifications enregistrées');
return Redirect::back();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment