W
W
web-quest32017-10-12 12:14:12
JavaScript
web-quest3, 2017-10-12 12:14:12

Passing parameters in laravel?

public function update(Request $request, $id)
{
//
}
also seen a lot in JS and wrote
click(e)
What is e ?
As I see it, these are arguments, but we didn’t pass them anywhere,
in Laravel, as I understand it, we catch these arguments somewhere there ...... or is this similarity as in js?
And what is this E (I understand that the element) and where does it come from?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Pautov, 2017-10-12
@web-quest3

e is short for event. This parameter comes by default, for example, when you hang events on dom elements.

document.querySelector('button').addEventListener('click', (event) => {
    console.log(event);
});

Bring it out and find out

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question