{"id":12867,"date":"2023-01-05T01:00:52","date_gmt":"2023-01-05T06:00:52","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=12867"},"modified":"2023-01-12T01:08:48","modified_gmt":"2023-01-12T06:08:48","slug":"laravel-9-46-release-available","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/laravel-9-46-release-available\/","title":{"rendered":"Laravel 9.46 Release with two JsonResource Methods now Available"},"content":{"rendered":"\n
The latest Laravel 9.46 Release is now available with two JsonResource methods added. These allow developers to conditionally include resource properties. There are also updates to the decimal validation rule, and more improvements and fixes.<\/p>\n\n\n\n
The The The above Laravel<\/a> additions have been contributed by Michael Nabil. There is an update to the decimal validation rule that supports signed number while Artisan serve now passes the PATH<\/strong> variable which might be necessary to the underlying code to use to find executables.<\/p>\n\n\n\n You can check out some Laravel 9.46 release examples showing the above features on this announce page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" The latest Laravel 9.46 Release is now available with two JsonResource methods added. These allow developers to conditionally include resource properties. There are also updates to the decimal validation rule,…<\/p>\n","protected":false},"author":1,"featured_media":12868,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,13,27,28,16,18],"tags":[164,252,344,350,424,433,449,452,471,591,635,636,638],"yoast_head":"\nwhenHas()<\/code> method has been added to the JsonResource. This gives users the ability to conditionally include attributes in a Response when an attribute is found on a model.<\/p>\n\n\n\n
unless()<\/code> method has also been added and is used for retrieving a value if the condition resolves to false.<\/p>\n\n\n\n