05-22-2016, 05:37 PM
As to why the update isn't being processed properly, it's pretty much one of those things you have to step through. It's almost always related to the id not getting passed from your form as just a single number. I would almost always do something like
to make sure you're really getting the id properly from your form.
Same thing with your custom message. Sorry to keep asking you questions, but when you say the update fails...what's failing. Are you getting a blank field in the db? Are you getting no change to the current field? Is it throwing an error?
Your code looks fine off the top of my head other than the 1 for the id.
Also, are you just wondering why the update method isn't working when the manual query works? I will say that for some reason the update method feels "pickier" to me sometimes. I use the full query every once in a while when I don't want to diagnose that.
I'll keep giving input though once I hear back from you. @Brian might have some ideas also.
Code:
$leagueID = Input::get('id');
Code:
dnd($leagueID) //Dump and Die
to make sure you're really getting the id properly from your form.
Same thing with your custom message. Sorry to keep asking you questions, but when you say the update fails...what's failing. Are you getting a blank field in the db? Are you getting no change to the current field? Is it throwing an error?
Your code looks fine off the top of my head other than the 1 for the id.
Also, are you just wondering why the update method isn't working when the manual query works? I will say that for some reason the update method feels "pickier" to me sometimes. I use the full query every once in a while when I don't want to diagnose that.
I'll keep giving input though once I hear back from you. @Brian might have some ideas also.