Monday, January 8, 2018

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

The issue was solved by the following way -  Add the following code in  AppServiceProvider.php under App/Providers folder  and don't... thumbnail 1 summary
The issue was solved by the following way - 
Add the following code in AppServiceProvider.php under App/Providers folder  and don't forget to import schema class
Laravel5_root/app/Providers/AppServiceProvider.php

The code block

use Illuminate\Support\Facades\Schema; 

function boot()
{
    Schema::defaultStringLength(191); //Solved by increasing StringLength
}

Disk [admin] not configured, please add a disk config in `config/filesystems.php`

In laravel, it is a security permission problem to write data into disk. Disk is not configured for admin, You need to add a disk config ... thumbnail 1 summary
In laravel, it is a security permission problem to write data into disk.

Disk is not configured for admin, You need to add a disk config in config/filesystems.php.


Open 'filesystems.php' file under config folder and add this to the disk array :

'admin' => [ 
        'driver' => 'local', 
        'root' => storage_path('app'), 
],