Skip to content

Instantly share code, notes, and snippets.

@SlyDave
SlyDave / Demo.php
Last active April 29, 2020 20:51
Example of using dynamic relationships in Laravel based on parent row condition with ordering and default on null match
<?php
$assignments = UserVesselAssignment::withDetails()->get();