Closed parsampsh closed 2 years ago
I've add this to my resource and the "Locations" dropdown works correctly, but "Classrooms" do not get loaded when I select a location.
NovaBelongsToDepend::make('Location', 'location', Location::class)->options(\App\Location::all()), NovaBelongsToDepend::make('Classroom', 'classroom', Classroom::class) ->optionsResolve(function ($location) { return $location->classrooms()->get(); })->dependsOn('Location'),
Very very stupidly, after I submited this issue, it just got fixed :)))) I think it was a prank from the universe! Kidding, I ran "composer route:cache" and "composer dump-autoload" and it fixed!
I've add this to my resource and the "Locations" dropdown works correctly, but "Classrooms" do not get loaded when I select a location.