sure it can - you will have to save that value yourself (by hooking into saved event or in your save controller method etc).. if you mean route model binding then you just need a func in your model to let laravel know (check the doc for func name)
Feb 1, 2019
3
Level 6
Using UID column for API Resource routes instead of ID
Can a field other than id be used for API Resources? I'd like to use a uid column for the routes. I don't want to change protected $primaryKey = 'id'; in my model, but would still like to use uid in resource routes.
Level 23
1 like
Please or to participate in this conversation.