Laravel migration syntax error access violation 1071 specified key was too long

Laravel migration syntax error, SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `personal_access_tokens` add index `personal_access_tokens_tokenable_type_tokenable_id_index`(`tokenable_type`, `tokenable_id`))

What worked for me was editing the config/database.php file in config directory.



I did it with Laravel 9.x

Related Answers

How to add line break in Whatsapp text message using javascript?

Sending messages is quick with the Enter key. But you can also added line break at WhatsApp text message via the API using request, we show here.

Please create your message string with “%0a” where you want to add line break.

Related Answers

i18next::pluralResolver: Your environment seems not to be Intl API compatible

i18next::pluralResolver: Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.


Just modifyed your i18n.js file and add “compatibilityJSON: ‘v3’” on init mathod.

Related Answers

React-native-gesture-handler you are using an old API

[react-native-gesture-handler] Seems like you’re using an old API with gesture components, check out new Gestures system!


If you are React Native Version 0.65+, Than please use navigation stack “@react-navigation/native-stack” inside “@react-navigation/stack

Navigation: stack => native-stack

Related Answers

React Native – Error while updating property ‘height’ in shadow node

Error while updating property ‘height’ in shadow node of type: RCTView when I test on real device, but nothing wrong on emulator


If you use width or height style property on Image or any order tag like below.

Just remove width or height form inline, move to a style class

Related Answers

Execution failed for task ‘:react-native-app-tour:generateDebugRFile’

Configuration on demand is an incubating feature.

Task :react-native-app-tour:generateDebugRFile FAILED
Task :app:mergeDebugAssets FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ‘:react-native-app-tour:generateDebugRFile’.

Could not resolve all files for configuration ‘:react-native-app-tour:debugCompileClasspath’.
Could not find com.getkeepsafe.taptargetview:taptargetview:1.13.0.
Required by:
project :react-native-app-tour

Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.


Please open node_modules/react-native-app-tour/android/build.gradle file and add following line.

You can find all version of taptargetview here:

Related Answers

Laravel- How to filter if date-time field with AM or PM date format?

Laravel query filter if date-time field with AM or PM date format. I will show between query on “open_at” and “close_at” field by using mysql STR_TO_DATE method.

Date Time field with AM or PM query:

Related Answers

Laravel- How to check user login password hash?

Laravel Hash façade provides secure Bcrypt hashing for storing user passwords. This will return true or false based on user given the password if matches or not.

Laravel Password Hash:

Related Answers

Laravel- How to send email from any controller?

I show an sample below, how to send email from Laravel any controller, for details (class, template and send example) please click on How to send email? here.

Create email class with build method on App => Mail directory.

Use email class on your controller or helper where from you want to send email.

Email send example:

Related Answers

Laravel – Join Query with Multiple conditions

In this article I will show you how to add multiple condition in the join query of Laravel Query Builder by using “on” method.

Related Answers