Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

blizzardza's avatar

Why is Laravel such an Uphill battle compared to just coding in PHP

have spent over 4 days (8 hours a day) I am not new to php but getting frustrated and losing time.

Documentation is vague it doesnt show anything about installing for MYSQL or MARIADB and then when you wade through 100's of other people posts you have to modify the code of laravel to make it work.....(defaeting the purpose of using a framework if im having to recode the framework) Zero documentation installing directly with Mariadb/Mysql instead you have to convert an SQLite isntall ation to make it work ???

list of issues so far.

php artisan breeze:install fails to install rror: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../". Found out npm was outdated (no listed version requirments in documentation on larvel website, nor was the error of any use)

solved that then moved on to making it work with mariadb/mysql

Now stting with the next problem

0001_01_01_000000_create_users_table ................................................................... 7.58ms FAIL

Illuminate\Database\QueryException

0001_01_01_000000_create_users_table .................................................................. 19.28ms 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: create table password_reset_tokens (email varchar(255) not null, token varchar(255) not null, created_at timestamp null, primary key (email)) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

at vendor\laravel\framework\src\Illuminate\Database\Connection.php:813 809▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 810▕ ); 811▕ } 812▕ ➜ 813▕ throw new QueryException( 814▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 815▕ ); 816▕ } 817▕ }

1 vendor\laravel\framework\src\Illuminate\Database\Connection.php:571 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")

2 vendor\laravel\framework\src\Illuminate\Database\Connection.php:571 PDOStatement::execute()

another couple hours lost and I must recode Laravel ?????

am I missing something here? Why is the documentation so vague? Why is Laravel just starting to feel like a rabbit hole ?

php frameworks are supposed to make life easier not create work. Should i not just carry on writing in PHP directly ?

0 likes
1 reply
tykus's avatar

it doesnt show anything about installing for MYSQL or MARIADB

Why should that have anything to do with Laravel or its documentation? Look up the documentation for those technologies and how they should be installed and configured for your host.

you have to modify the code of laravel to make it work

What do you mean, are you making edits to vendor files?

instead you have to convert an SQLite isntall ation to make it work

Change a few environment variables, and you can use a different database driver and connection. https://laravel.com/docs/11.x/database#configuration

Found out npm was outdated (no listed version requirments in documentation on larvel website, nor was the error of any use)

If only the docs mentioned what you need right? https://laravel.com/docs/11.x/vite#installing-node

solved that then moved on to making it work with mariadb/mysql

What is the default engine type configured on the database; MyISAM or InnoDB?

Please or to participate in this conversation.