Member-only story
Automatic status on 2 models
I am stuck since 2 days on a problem that I haven’t think before.
To be simple, I manage 3 models (Motorbike, Revision, Training).
If a motorbike is in revision or in training, I have to see on my form Motorbike that the moto is unavailable.
Example:
There are a training on 10/08/2019 with the motorbike 00004.
In my form Motorbike, the status has changed in unavailable for the motorbike 000004.
Well !
Now, my problem is in my form Revision, if I add a revision for the motorbike 000002
the status has to change in my form Motorbike also. Here the status has not changed...
In my Controller Motorbike I have this:
public function index()
{
$motorbikes =…




