heesel

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1364 Field doesn't have a default value values )

laravel Icon

Illuminate\Database\QueryException

SQLSTATE[HY000]: General error: 1364 Field doesn't have a default value values )

An unhandled exception occurred on line 678
675
        // message to include the bindings with SQL, which will make this exception a
676
        // lot more helpful to the developer instead of just the database's errors.
677
        catch (Exception $e) {
678
            throw new QueryException(
679
                $query, $this->prepareBindings($bindings), $e
680
            );

Solution

I forgot to add 'username' to my model.            
Apr 12, 2021 Anyone

0 replies


Install the browser extension

Found this solution helpful? Try our extension for quick solutions to your Laravel errors.

Chrome logo Add to Chrome - It's free