Skip to content

Tag: laravel

Laravel 8 form to update database

I am creating a simple blog site with CRUD functionality in Laravel 8. I have done this before using the deprecated Laravel forms, but am now trying to do it using HTML forms. However, I am having some problem with the update part of the website. I have a controller called BlogsController with this function t…

Laravel 7 does not display flash message

I’m not sure if it has anything to do with it, but I believe it may be something related to my routes, I may be talking nonsense. No flash message is being displayed, I was only able to display a message by setting it to Session::put, retrieving it in the view and then deleting it. When I use with, with…

Laravel 7 not finding with scopes

I have a model called Shift on my application, and I’ve defined my relationships and scopes on it like this: Relationship: With scope: Now, when I retrieve shifts and try to call these scopes, I do the following: However, I get this error… I’m not sure why this is happening? It should pick u…

Laravel 8 update JSON column value

I’m trying to update the value of a json column type for all of my users, my query that I’m running through Tinker doesn’t give any errors, it just returns 0 and the columns remain unchanged, what am I doing wrong? My columns on my rows currently has the value of… Answer After I have r…