Home > Back-end >  Laravel Artisan Tinker : write command on multiple lines
Laravel Artisan Tinker : write command on multiple lines

Time:03-31

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

CodePudding user response:

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

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