Комментарии:
first, good morning !
ОтветитьYour videos are amazing and very informative ❤️
ОтветитьWow nice 👍
ОтветитьMakes sense. Almost like a “verified at” time stamp.
ОтветитьVery useful , never new it was there . Thank you
ОтветитьNice !
I think I made the same functionality on my own.
Didn't know it was already in Laravel. 😅
Very informative. Thank you.
ОтветитьHello, If you can please review my package
shergela/laravel-command
How to structure recurable invoices and what if product got deleted after first invoice or if you have a custom invoice what if product 1 is recurable and product 2 is a service and its monthly and custom item 3 is recurable weekly I really need help on this please
ОтветитьI just don’t know what to say practically 😊🎉❤
ОтветитьThese short videos are perfect!
ОтветитьEvery day you publish a video. Every day I know what you are talking about and you teach me some new detail I don't know. Today you published a video about something I completely didn't know! Thanks man! ;)
ОтветитьNow it would be even better if you could use an array: $model->touch(['agent_read_at', 'last_message_at']);
ОтветитьThanks
Ответитьwhats the diffrence between touch and refresh method ? ex ( $user=User::find(*)->refresh();
ОтветитьI've never actually understood the point of the timestamps being written by the application, at least not by default. That's something you should have to turn on, not turn off. Why would you not just create a not null default timestamp column and another with on update timestamp and let the server deal with those? What am I missing about this? Is this just a little helper thing for people who are databasing and don't really know the basics of database? There are always going to be date/timestamp columns that the application must set but to me neither the created nor updated columns are one of them. As far as updating related table dates that's exactly what a trigger is for (which is what column defaults actually are under the hood). The database server is expressly designed to do such things for a very good reason and it's generally going to be far more efficient at it than manually updating columns from the application side. Not saying there's no place for keeping all of the database work on the application and strictly using the database for data storage, but I think that just makes doing things the wrong way easier and it actually puts more load on both the application and the database server. My databases are all full of triggers as well as procedures that attend to scenarios where if X happens Y has to happen and all of the data needed to do it is already in the DB. If adding to an invoice has to increase some number in some other table by that amount it would be silly to fetch the second number from the db, add it to the line item amount and then resave the new number, the database server could finish doing that and be back to playing solitaire before you even got the second number back from the DB. It's wasteful of resources, and if numerous things have to follow from an action it makes manually inserting/updating records directly at the database end far more complicated and prone to mistakes, if you've let the database do these things you can just insert a new row in the invoice table manually or from a csv and everything happens as it's intended to happen.
Ответитьapart from updated_at/created_at, do you know any scenario where "timestamp" data type is used? I was known that datetime should be used for a majority of scenarios.
Ответитьwow I've never used touch before but I'll definitely give it a try :o thanks man :D
ОтветитьWow! Very informative 👏 thanks man
ОтветитьThankyou Povilas
ОтветитьI've used touch method to trigger updated/updating events in model observers
ОтветитьCan anyone give me example to use touch function ?? Or in which case the update of the updated at will help ?? Thank you in advance.
ОтветитьThank you so much for the info!
Ответить👏👏Thank you so much Povilas!
Ответить