Bro you explain the course in a very simple way, super right on timing and the flow of the course its not fast and its not slow and your voice is easy on the ears, moreover you deliver the ideas pretty well, keep up the good work brother and thank you so much for this valuable course
I've got a question, instead of orderby can't we use sortBy? Do they work in the same manner or could we have problems if we use sortBy? Thank you so much for this tutorial ❤.
Thank you for watching. They do similar things, however. sortBy is only available on collections, meaning you can only call it after ->get() and it sorts using php code while orderBy is available before ->get() and it's sorted on the database level (it's added to the sql query). Generally speaking, OrderBy is preferred since it's done at the database level and would be faster, especially if you have an index on your table. OrderBy()->get() is generally faster and better (done on Database layer) ->get()->sortBy() is done in PHP ( generally would be slower), but it does have it's uses One more point is if you have pagination, it's harder to order using sortBy(), it's way easier to user OrderBy(). I hope it helps clarify the main difference.
I followed everything thoroughly and even used the template in the video instead of my own pages, but the entries are not saved in the data base, and not even the record works. i haven't skipped anything, I don't know why this is the case
Yes, it should be named identically. For why it is working, he didn't use "likes" => 0 or something in the array. He only used "content" => "test". Since the "likes" array isn't being filled, it worked and the default value he gave in the Idea model which is 0 will be assigned automatically. (I may be wrong)
Thanks for watching. Yes, it's a typo in the video, since we have a default value on our database, it's not giving any error message. This is something we fix in future episodes when implementing like button. Sorry for the confusion.
hi, how can i fix undefined variables on my blade file? im trying to do a foreach on my $ideas and it doesnt recognize it even tho i have the right code on controller
Thanks for watching Jeff. You can find the full code over at github github.com/yelocode/ideas/tree/91718b8d905747382c30d6f02697ac1d08fe1930 To check if there is something missing
in your file, vendor/laravel/framework/(src/illuminate)/Database/Eloquent/Model.php (or) you can just ctrl + click on the Model which will bring you directly to it.
Bro you explain the course in a very simple way, super right on timing and the flow of the course its not fast and its not slow and your voice is easy on the ears, moreover you deliver the ideas pretty well, keep up the good work brother and thank you so much for this valuable course
bro u are so underrated
Thank you
Well Explained! Thank u sir!
can you show your blade formatting setting in the setting.json ?
I've got a question, instead of orderby can't we use sortBy? Do they work in the same manner or could we have problems if we use sortBy?
Thank you so much for this tutorial ❤.
Thank you for watching.
They do similar things, however.
sortBy is only available on collections, meaning you can only call it after ->get() and it sorts using php code
while orderBy is available before ->get() and it's sorted on the database level (it's added to the sql query).
Generally speaking, OrderBy is preferred since it's done at the database level and would be faster, especially if you have an index on your table.
OrderBy()->get() is generally faster and better (done on Database layer)
->get()->sortBy() is done in PHP ( generally would be slower), but it does have it's uses
One more point is if you have pagination, it's harder to order using sortBy(), it's way easier to user OrderBy().
I hope it helps clarify the main difference.
@@yelocode Oh okay, I totally get it now. Thank you so much for explaining it thoroughly.
This should be a Udemy course.
Any ideas on why intellisense doesn't pick up ->create() method, or Idea::create(), at 9:25?
->save() worked for me
I followed everything thoroughly and even used the template in the video instead of my own pages, but the entries are not saved in the data base, and not even the record works. i haven't skipped anything, I don't know why this is the case
Hello sir, could you explain why it is working when you have in Idea.php 'like' in protected instead of 'likes' ? Shouldn't it be named identically ?
Yes, it should be named identically. For why it is working, he didn't use "likes" => 0 or something in the array. He only used "content" => "test". Since the "likes" array isn't being filled, it worked and the default value he gave in the Idea model which is 0 will be assigned automatically. (I may be wrong)
Thanks for watching. Yes, it's a typo in the video, since we have a default value on our database, it's not giving any error message. This is something we fix in future episodes when implementing like button. Sorry for the confusion.
hi, how can i fix undefined variables on my blade file? im trying to do a foreach on my $ideas and it doesnt recognize it even tho i have the right code on controller
did you fix it or not ? because ı have same problem
same problem as mine. How did you fix it bro?
I have a little problem: I use the commands php artisan migrate, but It give an error cause It does not find sessions.
Problem solved. Thanks anyway.
Nothing Works I don't know why , but I followed everything right since the tutorial 1
Thanks for watching Jeff. You can find the full code over at github github.com/yelocode/ideas/tree/91718b8d905747382c30d6f02697ac1d08fe1930
To check if there is something missing
if you are getting any error message you can also share here, I might be able to help you fix it
please give a link to the template
Here is the template link:
github.com/yelocode/bootstrap5-twitter-clone-template
Thanks for watching
where to find Model.php??
in your file, vendor/laravel/framework/(src/illuminate)/Database/Eloquent/Model.php (or) you can just ctrl + click on the Model which will bring you directly to it.
😬🤐🤐🤐🤐🤐🤐🤐🤐🤐
so basically u were gonna talk about model but then you left it and talked about something else and went on explaining controller
Bro this isn't good practise