Laravel 5 - SQLSTATE[22P02] - invalid text representation with postgres Laravel 5 - SQLSTATE[22P02] - invalid text representation with postgres laravel laravel

Laravel 5 - SQLSTATE[22P02] - invalid text representation with postgres


The SQL query shows that Laravel is calling a different controller method on your route than you are expecting.

select * from "users" where "id" = dismissnotification

That query is trying to find a user with the ID matching 'dismissnotification', so it looks like it's hitting something like UsersController@show or UsersController@edit or maybe even UsersController@222222225 depending on what other routes you have defined for /user.

Since URL::route() rendered the path as you expected, your issue is probably the order in which you defined your routes; however, without seeing all of your /user routes and in the order you defined them, I can not be more specific.