David CarrforDC Blogdcblogdev.hashnode.net路Nov 5, 2022Laravel use multiple boot in traitsLet's say you want to use multiple traits in your models to reuse common code such as applying UUIDs and settings global query scopes like this: use HasUuid; use HasTenant; Each of these traits has a boot method: HasUuid: trait HasUuid { public f...Discuss路69 readstraits
David CarrforDC Blogdcblogdev.hashnode.net路Nov 5, 2022Laravel use multiple boot in traitsLet's say you want to use multiple traits in your models to reuse common code such as applying UUIDs and settings global query scopes like this: use HasUuid; use HasTenant; Each of these traits has a boot method: HasUuid: trait HasUuid { public f...Discuss路69 readstraits