Laravel Artisan Console Command - Input Limits

I have an artisan command which prompts the user for a long token string:

public function handle()
{
    $name = $this->ask('What is your token?');
}

I'd like to paste the following into the command:

e1yJraWQiOiJacmRwRFwvMTdDUFRBcytpT3ZZQ2V0WGc2Q0IrUFd3a3NmYjdwNktFT29JZz0iLCJhbGciOiJSUzI1NiJ9.eyJjdXN0b206YWNjZXNzIjoie1wiNTIwMTU4NzctNTU0Ziw00MjBjLTk0MjctMmZhMjFkYTFiNzE4XCI6e1wiclwiOlwicHJvdmlkZXJcIixcInBcIjp7XCJ2XCI6XCIxXCIsXCJhXCXCI3RlwifX19Iiwsc3ViIjoiMmZv5ZDYtZDE5Ny00ZDA5LWgExYWYtN2RjNGE4ZTEwN2M2IiwiYXVkIjo2iNWhzM2xnc2wzZ2NjbGVwcmlxMGk2Zmtw0OWIiLCJwsldmVudF9pZCI6ImZkNTUxMjgxLTdhM2ItNDgxdZC05MzJmLWU4ODM0YjI1YzY1OSIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNjU0NjM5MzEwLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMbtZWFzdC0xLmXpvbmF3cy5jb21cL3VzLWVhc3QtMV34dUh5eWo4dHIiLCJjb2nVzZXJuYW1lIjoiMmZjOWY5ZDdYtZDE5Ny00ZDA5LWExYWYtN2RjNGE4ZTEwN2gM2IiwihZXhwIjoxNjU0NjQyOTEwLCJpYXQiOjE2NTQ2MzkzMTAsImVtYWlsIjoiZHJrY2hpcm8sdxQGdtYWlsLmNvbSJ9.OD9WO9Msxv664SWSSSB-yABL9E-j0lGRGgZTtXVg5RZu-wVTrMAmxR--k7rsqo_AFSbN80u8oqIhuuKO7jeMNCk-rmzdKRjJbqxRnnfN9kR9redhpKPL15bFUZlJwK6RiODG6PFBh8ZETWl9B76Z3wlncIHWOARLTKVjXkPrdxaumlwYBurfoOJWLsNBexK8ORYWYV_WRcnOtUeDwLd_dahTeMRMNBK4Pu1bxPY0L0SBsdJQE3Y_Jbv4oD7cLepDTjJhUM2kPes12n4xgM3a4laSfNuHILT6wRbPm925eV-vpgeyiPYDEOMSDkCy1gPhs6du3aMspjQq1bPjWc7qV7uCsupkgr5478hHsd7834ghJD

But when I try to paste in the entire string, it truncates the string and I'm unable to paste the entire string, which effectively makes the command useless. Any advice on how I can get it to be able to paste the entire string?

Versions

  • PHP 7.4 (Using PHP Monitor)
  • Laravel 5.8
  • Running on Valet

What I've tried

I'm currently using iTerm and I can successfully paste the entire string into just the command prompt. My issue seems to happen only when prompting from a Laravel command.

I've also changed the command to use arguments such as command:token {token} (as suggested by @MichaelMano in the comments below). This approach works, but it would be a better user experience to ask for the token rather than require the user to remember to include the token when executing the command. If possible, I'd still like to use the ask method to get the token from the user.



Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)