Open miaK1110 opened 1 year ago
### Don't answer these threads for too long. But "$form->model()->id" didn't work for me. I developed these methods this method.
//my exaple route localhost/admin/x/id/edit use Illuminate\Support\Facades\URL;
$string = URL::current(); $explode = explode('/x/', $string); $explode = explode('/edit', end($explode)); $id = $explode[0];
I have a customer model and person in charge model, and I want to get customer info from customer grid when creating or editing person in charge form.
I was able to get as far as giving the ID, but I don't know how to get this ID back into the form.
Here is my code. In person in charge form, you press the button to open a new window
then call this function (this function is in the same controller as the person in charge form)
When you press 'Select' action, call this custom action
Any advice would be greatly appreciated!