Posts

Showing posts from 2024

Laravel Sail on Windows issue - "cmdlet Invoke-WebRequest at command pipeline position 1"

Image
I tried to install a laravel example app using Laravel Sail. When I executed following command I got following error even I install Docker Desktop in Powershell cmdlet Invoke-WebRequest at command pipeline position 1  Supply values for the following parameters:  Uri:  Then I tried to find the issue in the laravel documentation. But it is not explained about this issue and recommended steps either. I have found following solution:   1) You need to enable WSL in docker desktop. 2) Install WSL on the computer using Windows terminal - https://apps.microsoft.com/detail/9n0dx20hk701?hl=en-US&gl=US Install WSL - https://learn.microsoft.com/en-us/windows/wsl/install 3) You may be able to open tabs in Terminal with installed linux distribution. Thank you

Laravel 10 - Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (Connection: mysql, SQL: alter table `users` add unique `users_email_unique`(`email`))

 I got the following error when executing the migration command for the first time.  PS C:\wamp64\www\example-app> php artisan migrate    INFO  Running migrations.   2014_10_12_000000_create_ users_table .............................. .............................. ......... 39ms FAIL    Illuminate\Database\ QueryException   SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (Connection: mysql, SQL: alter table `users` add unique `users_email_unique`(`email`))   at vendor\laravel\framework\src\ Illuminate\Database\ Connection.php:829     825▕                     $this->getName(), $query, $this->prepareBindings($ bindings), $e     826▕                 );     827▕             }     828▕   ➜ 829▕   ...