A
A
Agelios2018-12-03 13:55:34
phpstorm
Agelios, 2018-12-03 13:55:34

How to insert variable in phpstorm code template?

Need to make custom formRequest in laravel project.

public function response(Validator $validator)
    {
        ...
        $validator->errors()
    }

Here are the rows of code there. Whatever it is, I decided to make a CodeTemplate in phpstorm, but when creating it, storm wants me to enter a validator. How can I make him just put it in?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Agelios, 2018-12-03
@Agelios

Found a very stupid solution.
#set($validator = "$validator")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question