Resolved<P>says "if this is a promise, the type here is whatever the promise resolves to; otherwise, it's just the value"
ReturnType<T>gets the return value of a given function
Rhas to be
Routeitself or a subclass) uses TS's mapped types to say "the property named
ModelFrom<Route>ends up giving you the resolved value returned from the
modelhook for a given route:
modelon the controller
Controlleris always exactly the type returned by
Route::modelby writing something like this:
modelproperty will always stay in sync with the corresponding route’s model hook.
modelin either the
setupControllerhooks on the route! That's generally considered to be a bad practice anyway. If you do change the type there, you'll need to define the type in some other way and make sure your route's model is defined another way.