danmurphy
07/01/2022, 5:48 PMvar foundItem = getInstance( 'FoundItem' )
.where( 'id', rc.id )
.whereRaw( 'NVL(status, ''P'') = ''P''' )
.firstOrFail()
.getMemento();
But is there a way to just put this on my Quick Model directly so that it never tries to bring back a record with any other status and we don’t have to deal with it all over the place? That way I could just do var foundItem = getInstance( 'FoundItem' ).findOrFail( rc.id ).getMemento();
instead anywhere we need one. Thoughts?sknowlton
07/01/2022, 5:51 PMapplyGlobalScopes()
danmurphy
07/01/2022, 5:54 PMdanmurphy
07/01/2022, 6:22 PMdanmurphy
07/01/2022, 6:23 PMdanmurphy
07/01/2022, 6:23 PM