'Laravel Artisan Tinker : write command on multiple lines

How can I write a command on two lines with Laravel Artisan Tinker ?

User::whereEmail('[email protected]')
->get()

PHP Parse error: Syntax error, unexpected T_OBJECT_OPERATOR on line 1



Solution 1:[1]

Use the \ character to force the REPL into multi-line input mode:

>>> User::whereEmail('[email protected]') \
... -> get()

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Noman Saleem