我目前正在建立铁路3号申请的路线,如果有人能向我指明正确方向,我将不胜感激。
基本上,我正在建立一些路线,为一些有条不紊的退学现象提供数据,并且希望能够有下列路线:
/vehicles/trims/01299999
/vehicles/trims/02299999
1 0299999和022999999999是两种不同的参数(在这种情况下,请说的是1 0299999载荷:车辆进入准绳,229999999是:油类。 我知道,我可以确保他们通过使用限制,前往正确的控制者行动,装载正确的武器。
然而,造成这一复杂情况的原因是,我能够按任何顺序安排在导游中指明一个以上选择,例如:
/vehicles/trims/01299999/02299999
或
/vehicles/trims/02299999/01299999
and these would load the c或rect params based on the structure of the id number (so if it starts with 012 it should always be :vehicle_make and if it starts 022 it should always be :fuel_type. How can I do this?
As a side note, it would be great if anyone could indicate how to constrain the id column f或 my models, so that when a vehicle make is created, its id should always start 012 and so on.
Thanks f或 any assistance!