It's perfectly fine; it doesn't matter what the data is to uniquely identify a record to determine updating over creating; id happens to be particularly effective.
Nope. When you have ID it means it is already created. Usually, ID is auto-incremented and shouldn't be defined manually. You can always create an additional column that will hold your internal ID and that you can use for your purpose.
You have to make an explicit read request to get the Model instance @bugsysha and then determine whether to perform update or create depending on the outcome - the updateOrCreate method abstracts all effort into a single method.
Well, i did use updateOrCreate query just based on primary id. Seems to be working so far.
But, I think The only problem with this is that we have to make sure we are sending the id in the controller and its not null. otherwise the updateOrCreate will not find the ID and instead of updating the row, it will create the row.
Well, that is exactly the point of updateOrCreate; what else were you expecting?
The first array is a set of data to (potentially) locate an existing record; the second, the data to update that record with (or create an entirely new record).