Hello, I'm having a struggle with Laravel while trying to make post tags to work... Here is my problem:
I need to insert new tag or add an existing tag. I pass existing tags id to the system, and the tags which does not exist has their name. So technically i should get out with this code: http://pastebin.com/pDEnNeTK
Can anyone say what am I doing wrong? Because if the tag exists - i have a new tag created with the existing tag id as the name and then attached to my article...
Anyone has any ideas how to avoid that? Or I'm doing everything totally wrong?
You should be using is_numeric instead of is_integer
is_integer(1) //true
is_integer('1') //false
is_numeric(1) //true
is_numeric('1') //true
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community