Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cast a valores enteros #29

Open
celli33 opened this issue Jan 27, 2022 · 0 comments
Open

cast a valores enteros #29

celli33 opened this issue Jan 27, 2022 · 0 comments

Comments

@celli33
Copy link
Contributor

celli33 commented Jan 27, 2022

Cuando se usa el driver de php de sqlite en lugar del de mysql todos los valores son regresados como strings, por lo tanto a cada uno de los modelos hay que agregarles el cast correspondiente dentro del atributo $casts. Para evitar inconsistencias en los tests. Por ejemplo dentro de App\Models\User:

protected $casts = [
        'id' => 'int',
        'email_verified_at' => 'datetime',
    ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant