#Eloquent or sqlRaw scope advice
9 messages · Page 1 of 1 (latest)
Oh okay, I misunderstood. Then I would make the scope something like "where id is in(subquery selecting MAX(id) grouped by user_id)"
Is it too late to switch to a normal incrementing primary key? You can still have a uuid column, but integers make life a lot easier. And faster (at least on MySQL, don't know if it's different with postgres)
sid help me pls
@hallow pewter can you help me woth this error pls (The GET method is not supported for this route. Supported methods: POST.)
ok
Yeah you could have both 'id' (normal incrementing, PK) and a 'uuid' column (indexed). You don't have to expose the id column to the outside world.
There are a few ways you can make route model binding use uuid in stead of id.
I don't know enough about the models to answer that.