Solution to 1071:Specified key was too long problem in Laravel.

I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.
Search for a command to run...

I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.
No comments yet. Be the first to comment.
Create a .htaccess in the root of the directory and append this line anywhere in the file. AddHandler application/x-httpd-alt-php74___lsphp .php Here 74 represents PHP version 7.4. If we want 8.1, it would be 81.
We are going to create a local domain like app.local, Create a self-signed wildcard certificate which will works for subdomains as well and point the domain to a locally running site. Generate a self signed certificate https://www.brainbytez.nl/tutor...
GIT_COMMITTER_DATE="Sun Jul 16 14:00 2023 +0545" git commit --amend --date="Sun Jul 16 14:00 2023 +0545"
mkdir output && for file in *.heic; do heif-convert -q 100 "$file" "output/${file/%.heic/.jpg}"; done mkdir -p output && for file in *; do [[ $file == *.heic ]] && heif-convert -q 100 "$file" "output/${file/%.heic/.jpg}" || cp "$file" output/; done
https://dev.to/cloudx/how-to-use-puppeteer-inside-a-docker-container-568c Dockerfile FROM node:slim # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true # Install Google Chrome Stable and fonts # Note: this installs the...
Hi there, If you encountered this error message on laravel
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long;
Then here's a quick fix, All you have to do is to add the following code in the
app\Providers\AppServiceProvider.php.
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
Now run a fresh migration with
php artisan migrate:fresh
This will solve the problem.
Happy Coding.