How to Create a Blog in Laravel | Laravel CRUD | Laravel Blog | Create a Blog in Laravel

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 439

  • @codewithdary
    @codewithdary  Год назад +1

    If you're looking to level up your Laravel skills? My new course "Mastering Laravel 10 Query Builder, Eloquent & Relationships" is the perfect opportunity: www.udemy.com/course/mastering-laravel-10-query-builder-eloquent-relationships/?referralCode=C784C3DB5B8925207FCB

    • @agnikaineverdies7646
      @agnikaineverdies7646 Год назад

      The images aren’t showing up on mine, there’s something wrong with the image path, what format should it be when putting the path in the imag tag ‘src=img path’??

  • @ronniemmola5198
    @ronniemmola5198 2 года назад +12

    Hey Dary the coder ! i watched this tutorial many times and i managed to nail a laravel developer position and now i am mastering the art of Laravel everyday , so i want to say thanks to you for opening my door by sharing this video tutorial , you are a Laravel Guru , i like how you know the tailwind css for spacing and sizes by default , wow .

    • @codewithdary
      @codewithdary  2 года назад

      Hi Ronnie. Thank you so much for your encouraging words man, appreciate it :D

    • @PauNicolae
      @PauNicolae 2 года назад

      Congrats! ❤️

  • @stormbytes
    @stormbytes 2 года назад +1

    Was ready to give up on Laravel before I found Dary’s tutorials. This dude is a natural.

    • @codewithdary
      @codewithdary  2 года назад +1

      Never give up man, you are putting so much effort in to learn Laravel, good job!

  • @AlY-dr8hp
    @AlY-dr8hp 3 года назад +21

    "INCREDIBLE" this tutorial is a gem, thank you Daryl, simply the best php/Laravel content in RUclips.

    • @codewithdary
      @codewithdary  3 года назад +2

      Appreciate it dude! Hope you are satisfied with it!

    • @AlY-dr8hp
      @AlY-dr8hp 3 года назад

      I'll be diving deeper into larvae for a project embedding python for Stock price action predictions.
      Hope you can show me some pointers once on production.
      Thank you again.

    • @frederickpolli2544
      @frederickpolli2544 2 года назад

      I agree. I've been watching a lot of tutorials to try and learn this stuff, and Dary is by far the best.

  • @AlY-dr8hp
    @AlY-dr8hp 3 года назад +6

    Simply the best Laravel php on the web training, even better then udemy.

    • @codewithdary
      @codewithdary  3 года назад

      Whoa, best comment I've seen today

  • @kiche_allan
    @kiche_allan 3 года назад +1

    Darry am just 18 minutes into the video tutotial and I came back to subscribe this channel. My official laravel channel. The video is just too awesome. Thanks for putting it together

    • @codewithdary
      @codewithdary  3 года назад

      Wow, that's awesome to read Allan. Let me know if you finished it :)

  • @sigenaisapa
    @sigenaisapa 2 года назад +1

    I been rusty in Laravel and this tutorial is a good start to brush up. Keep it up man!

    • @codewithdary
      @codewithdary  2 года назад +1

      Lovely Rafael, I did my best to help you out! :)

  • @_sudipb
    @_sudipb 3 года назад +6

    Thank you Dary. I watched your previous tutorial on laravel as well as this tutorial. Now, i feel like i have learned all the basics of laravel. Really appreciate it.

  • @mariannehartigan
    @mariannehartigan 3 года назад +3

    Thank you so much. I tried many courses and this was the best. I am just starting out in Laravel and wanted to learn Laravel 8.

  • @kavehsarkhanlou8608
    @kavehsarkhanlou8608 3 года назад +13

    underrated! these videos need spreading around

    • @codewithdary
      @codewithdary  3 года назад +1

      Thanks buddy, appreciate it. Hopefully we’ll get there! :)

  • @danycreations4932
    @danycreations4932 3 года назад +1

    You're the best teacher I've ever come across in my life. perfect Dary

    • @codewithdary
      @codewithdary  3 года назад

      Wow I feel gassed. Thank you so much buddy :)

  • @djtsm9656
    @djtsm9656 11 месяцев назад +3

    hey dary the coder , u are angel i love what y r doing keep never surrender

    • @codewithdary
      @codewithdary  11 месяцев назад

      Thank you so much, will never do

  • @anggittama5880
    @anggittama5880 2 года назад +2

    Thanks bro for the video. This video really helped me to pass my assignment, also now I feel more comfortable using Laravel as my framework.

  • @bustahh7592
    @bustahh7592 2 года назад +1

    I want you to know that you are doing great work. You literally saved me! Without this tutorial I would have failed my exam. Big ups brudda!

    • @codewithdary
      @codewithdary  2 года назад

      Wow that's why I do it man, glad to hear that :)

  • @HK-gu2jr
    @HK-gu2jr 3 года назад +1

    Still i looking this lecture. Appreciate again!

    • @codewithdary
      @codewithdary  3 года назад

      Love to hear that. If you do understand CRUD with your eyes closed your pretty much set to create a lot of apps!

  • @turdakhov
    @turdakhov 2 года назад +1

    Thank you for sharing your knowledge! It is so helpful for noobies like me!

    • @codewithdary
      @codewithdary  2 года назад

      Haha! No noobs out there man, we are all in a learning process

  • @serhiicho
    @serhiicho 3 года назад +11

    44:12 That's the mistake that many Laravel developers make, if you want to get a collection of posts with user relationship, you need to preload relationship by specifying it like that: `Post::with('user')`, otherwise you will be querying user for each post. For example you have 50 posts, now you will make 50 requests to database to get user for each post.

    • @codewithdary
      @codewithdary  3 года назад +10

      Thanks for sharing it with me :D

    • @rafaelgruia8734
      @rafaelgruia8734 3 года назад +1

      @@codewithdary so, how the update using `Post::with('user')` looks like?

    • @gorandigitalnomad
      @gorandigitalnomad 3 года назад

      @@rafaelgruia8734 you can use it in model:
      /**
      * The relationships that should always be loaded.
      *
      * @var array
      */
      protected $with = ['user'];

  • @negi3625
    @negi3625 3 года назад +1

    It was so much fun creating this thing😊

    • @codewithdary
      @codewithdary  3 года назад

      Right? I loved making it as well!

  • @tanvirhasanmonir1627
    @tanvirhasanmonir1627 2 года назад +1

    Awesome tutorial for beginner. Thanks a lot for your effort. Your teaching style is amazing. I've finished the project and enjoyed a lot.

    • @codewithdary
      @codewithdary  2 года назад

      Great to hear that Tanvir, thank you :).

  • @norbertwagner8410
    @norbertwagner8410 3 года назад +1

    It should be a separate video in which you solve the mix problem. It was lifesaving.

    • @codewithdary
      @codewithdary  3 года назад +1

      Wait... That's a great idea LOL

  • @Ankitshah-gx9ct
    @Ankitshah-gx9ct Год назад

    Hey Dary
    Big fan from India
    Very excited for laravel and react ecommerce backend+frontend

    • @codewithdary
      @codewithdary  Год назад

      Thank you so much. That’s not planned for the first quarter of the year.

  • @ivani7976
    @ivani7976 3 года назад +2

    Can you please instruct me on how to add multiple image upload. How would you do it, and how would you specifice a certain position for a certain uploaded image in the body of the post. On the side note, love your videos, keep it up, wish you all the luck.

    • @codewithdary
      @codewithdary  3 года назад

      I usually prefer to use a table called post_image where you store the post_id and image_url

  • @notexpert8902
    @notexpert8902 3 года назад +3

    Woow this is a really great tutorial. Thanks a lot.
    Greetings from Bosnia 👋👋

  • @ZUGAMER5556
    @ZUGAMER5556 2 года назад +1

    Simply Amazing. I need to say thankyou for this video.

    • @codewithdary
      @codewithdary  2 года назад +1

      You're very welcome Rehman! :)

  • @brendan1675
    @brendan1675 3 года назад +1

    Hi thanks for the video. Just a friendly tip... anchor is pronounced ain (same as the sound in pain but no p) than cer with a HARD C like the C in Cat... so ain - Cer .... and array != air-ray ... array == a (ah like in a-pple) then ray... ah-ray

    • @codewithdary
      @codewithdary  3 года назад

      Appreciate it Brendan! I’m working on the way I pronounce works! May I ask where your from?

    • @brendan1675
      @brendan1675 3 года назад +1

      @@codewithdary Yep no problem. Generally your pronounciation is good so I wouldn't worry about it too much! from Canada.

    • @codewithdary
      @codewithdary  3 года назад

      Thank you man, always room for improvement right? 💪🏼😄

  • @yeasinarafat8227
    @yeasinarafat8227 3 года назад

    Best video for beginner. Thanks a lot!

  • @KaKar0
    @KaKar0 3 года назад +3

    This course is exactly what I've been looking for! Thanks Dary!

  • @brunofelix5434
    @brunofelix5434 3 года назад +2

    Brazil watching. Very amazing your videos.

  • @maxluizcarvalho
    @maxluizcarvalho 3 года назад

    Simply, the BEST Laravel tutorial

  • @EusebiVidal
    @EusebiVidal 3 года назад +2

    Thanks for your videos of Laravel! They are very useful. I follow your steps except Tailwind (I use bootstrap).

    • @codewithdary
      @codewithdary  3 года назад +1

      Bootstrap is awesome to use as well! Thanks for watching

  • @Hasoon-ry8pu
    @Hasoon-ry8pu 2 года назад

    Thank you very much for your style explanation wonderful and simplify things as much as possible And we hope for more courses laravel

    • @codewithdary
      @codewithdary  2 года назад

      Definitely the topic I'll be focusing on. Thank you :)

  • @ronjay5916
    @ronjay5916 2 года назад +1

    Another great video from Dary ! thanks a lot !

  • @zeidinio
    @zeidinio 3 года назад +1

    keep it up bro . you are helping too much people around the world you are a hero :)

    • @codewithdary
      @codewithdary  3 года назад

      Thanks, Shadi. Responses like this are the reason why I love doing it man.

  • @rajatchauhan6675
    @rajatchauhan6675 3 года назад +1

    completely in love with this tutorial

  • @anaflorea898
    @anaflorea898 3 года назад +2

    Thanks a lot Dary, it's very well and clearly explained!

  • @praveenpradeeptulaskar8791
    @praveenpradeeptulaskar8791 2 года назад

    Suggestion: keep controllers in singular case. PageController and PostController would be the right naming convention as to PagesController and PostsController

    • @codewithdary
      @codewithdary  2 года назад

      Plural. Although the official laravel docs use singular for controller names, it is very well known that most of prominent laravel developers such as Jeffrey Way, Adam Wathan, Chris Fidao and many others uses plural for controller names that it sort of become the actual standard.

  • @clementborisov7050
    @clementborisov7050 Год назад +2

    I know that this is outdated, but when you create slug for the post, can't you just use the Str helper from Laravel? Why do you need to use external services while you can just use Illuminate\Support\Str and do something like:
    Str::lower(Str::slug($request->title))

    • @codewithdary
      @codewithdary  Год назад +1

      I don't think it was available back then. I've been using the Str facade nowadays though!

  • @tecknolog123
    @tecknolog123 3 года назад +1

    You deserve a credit, that helped me a lot 👍

  • @umairahmad4684
    @umairahmad4684 2 года назад +1

    Good one👍. I am little confuse from the commands used for this project setup. Is there any video where you have explain about such commands or any other source?
    Thanks

    • @codewithdary
      @codewithdary  2 года назад +1

      Those are command line interface commands which you will learn once you start using frameworks! Haven't really covered them in a separate video, just in my Laravel courses :)

  • @johnattaiyinusa5766
    @johnattaiyinusa5766 3 года назад +3

    Great content! You are doing a great job, Dary.

  • @bisnu-kundu
    @bisnu-kundu 3 года назад +2

    Thanks for your videos of Laravel!

  • @HK-gu2jr
    @HK-gu2jr 3 года назад +1

    This is exactly what i want. Thank you again Dary. I respect!

  • @ScotHenderson
    @ScotHenderson 3 года назад +1

    Ty for this .. your very clear and easy to follow. I did find another solution for the mix issue at the moment by using yarn .. thoughts??

  • @khoaavan8075
    @khoaavan8075 Год назад +1

    thanks for the tutorial, it's very helpful

  • @nenads.6828
    @nenads.6828 2 года назад +1

    Hi man, you doing a great job here. Do you have in plan some tutorial about creating admin panel in Laravel?

  • @santiagoguerrerop8957
    @santiagoguerrerop8957 3 года назад +1

    Amazing video! Is really interesting to watch

  • @TheViPerBlackHawk
    @TheViPerBlackHawk 3 года назад

    This helps so much since I’m learning Laravel at the moment

    • @codewithdary
      @codewithdary  3 года назад

      Hey Bradleigh I’m glad I could help! :).

  • @chrisdavid9009
    @chrisdavid9009 3 года назад +1

    Dary we love u ur course is just the best i have ever came across. plz can u help build real life project with Resfull API driven

    • @codewithdary
      @codewithdary  3 года назад

      I just finished a crash course but I’ll definitely make a project in the future!

  • @Unknown-yn4pk
    @Unknown-yn4pk 3 года назад +1

    MAN, i LEARNT A LOT FROM YOU, THANKS!!

  • @mohammadjabedhosen9680
    @mohammadjabedhosen9680 3 года назад +1

    Thank you very much Dary!

  • @michaeladetona5880
    @michaeladetona5880 3 года назад +1

    Awesome Tutorial. really loved it. could you please make a video on how to add post category to the blog?

    • @codewithdary
      @codewithdary  3 года назад +2

      Sounds interesting. Might do it in the future buddy!

  • @zoltanhorvathandsomenumbers
    @zoltanhorvathandsomenumbers 3 года назад

    I don't know what happened to the sound of the video, but your voice is much cleaner and balanced in here than in your Complete Laravel 8 Course Tutorial video. Your mic is the same right? Good job!

    • @codewithdary
      @codewithdary  3 года назад +1

      I switched from software towards the end of the complete tutorial. Thanks man, appreciate it!

    • @codewithdary
      @codewithdary  3 года назад

      Mic is exactly the same btw!

  • @saibalmisra3818
    @saibalmisra3818 3 года назад +1

    Pro Max content....thanx buddy

  • @bisnu-kundu
    @bisnu-kundu 3 года назад +1

    The next video wants a multi-authentication with roles, please make this video. I am waiting for this video.

    • @misterblack4737
      @misterblack4737 3 года назад

      Yes, a tutorial with multiple roles like admin, teacher and student. Would be great

    • @codewithdary
      @codewithdary  3 года назад +2

      Might be do it soon then!

  • @juntuedelafuente4498
    @juntuedelafuente4498 3 года назад +1

    Hello! what to do if create/edit/delete buttons are on a separate page? for instace, view is only for users and create/edit/delete is for admins. Great tutorial by the way!

    • @codewithdary
      @codewithdary  3 года назад +1

      Well then you need to think about how you’re going to pass in the id of a specific post to another page! :)

  • @Hakira_GT
    @Hakira_GT 3 года назад +1

    Subscribed, great content , a laravel video that actually shows some backend to frontend content request

    • @codewithdary
      @codewithdary  3 года назад

      Love to hear that. Welcome to my channel :D

  • @noelremasu
    @noelremasu 2 года назад +1

    Amazing tutorial… is it advisable to use a package to manage the slug or use the STR::slug helper class instead?

    • @codewithdary
      @codewithdary  2 года назад

      You can use that too, which maybe is even better. I just like to mix things up! Haha :)

  • @labka7445
    @labka7445 3 года назад +1

    Thank you very much ,perfect job.

  • @sixnine8352
    @sixnine8352 3 года назад +2

    Hi Dary, Thank you for the video. Since we are using the title to create the slug & the slug is used to get the title (for the show & edit page), how does one make the slug unique if you use the same title for different post
    also is it not advisable to use the id instead

  • @azadeyvazov1812
    @azadeyvazov1812 3 года назад +1

    Thnaks. Nice video tutorial

  • @muzika5001
    @muzika5001 2 года назад +1

    This was excellent tutorial and great introduction to make my own similar CRUD website for personal needs. Thank you very much, Dary! Do you plan to make exciting projects after completing laravel 9?

    • @codewithdary
      @codewithdary  2 года назад

      Not any planned but definitely will! :)

  • @josimarsouza237
    @josimarsouza237 3 года назад

    show man, im from brazil i would like to say thanks for this tutorial

    • @codewithdary
      @codewithdary  3 года назад +1

      Thanks for watching Josimar!! :)

  • @MULTICODE
    @MULTICODE 3 года назад +1

    You really have a good way to make tutorials. Hope you are going to show us how to deploy a complete Laravel project with authentication. Keep on uploading good content on Laravel.
    I will also like to know what frontend javascript framework are you using as a developer. Thank you .

    • @codewithdary
      @codewithdary  3 года назад

      Thank you, very kind from you to take time and write this lovely comment.
      I’m actually working on it right now! :)
      It really depends on what I want to make. I even use vanilla JS when I need to do basic stuff. But I use react or vue every once in a while as well.

  • @temdenis4109
    @temdenis4109 3 года назад +1

    Thanks a million for this project sir , it has helped me a lot

  • @jackforthewin
    @jackforthewin 3 года назад +1

    Awesome video. It was a big help.

  • @softwareEngineerKunwar
    @softwareEngineerKunwar 3 года назад +1

    Hello, thanks for your tutorial. I've watched full video and made a simple blog like yours with confirm delete on delete, added myself, and delete image added myself. I wish, you use bootstrap framework for UI instead of tailwind because for a simple UI block in Tailwind need lot of class but in bootstrap does not need that much and UI will be better too.
    While following your tutorial, I take much more longer time, I think, due to tailwind. It would be faster, if it has used bootstrap instead.
    I want to see Fullstack Laravel, Vue.js, bootstrap RESTful Api at advance level. Thanks in advance level.

    • @codewithdary
      @codewithdary  3 года назад +3

      Well my main goal is to reach Laravel and not bootstrap or tailwind. So you can basically adjust the Laravel code with a bootstrap framework! I’m adding styling to make it a bit better looking.

  • @lehlohonolomotsoeneng6672
    @lehlohonolomotsoeneng6672 3 года назад +2

    Thank you so much for this tutorial, it helped me alot.

  • @stefanocons
    @stefanocons 3 года назад +1

    This tutorial is awesome! Thank you man

  • @kevic3051
    @kevic3051 2 года назад +2

    You are the Best

  • @GoldDevs
    @GoldDevs 2 года назад +1

    Thanks for the AMAZING TUTORIAL ,I really enjoy your style of teaching :-), and could you tell me the vscode laravel, tailwind and folder extensions your using, please thanks a lot

    • @codewithdary
      @codewithdary  2 года назад

      Do you mean the “Vs code great icons” extension? Anyways thank you for your kind words!

  • @CarolineMiddlebrookUK
    @CarolineMiddlebrookUK 3 года назад +2

    Such a helpful tutorial Dary! I really enjoy your style of teaching :-)

    • @codewithdary
      @codewithdary  3 года назад

      Ah thank you Caroline! Means a lot to me!

  • @ditakrisna1818
    @ditakrisna1818 Год назад +1

    Why didn't I find your channel sooner😭 now I get B+ in my web developing study if I just find your channel sooner I might get an A😭

    • @codewithdary
      @codewithdary  Год назад

      Haha thank you so much. I hope I get you a A+ now ;)

  • @muhammadsaleh3246
    @muhammadsaleh3246 2 года назад +2

    Hello, my image does not load on the home page. The text "Want to become a developer" and Read More are there but the image doesnt load. Please help. I've checked the name of the background image and all.

    • @codewithdary
      @codewithdary  2 года назад

      You can add the image in the style attribute of an element as well

    • @muhammadsaleh3246
      @muhammadsaleh3246 2 года назад

      ​@@codewithdary how?

  • @move128bits3
    @move128bits3 2 года назад +1

    thank you for this tutorial i want ask you on 38:25 when you write the command Schema the box appear have the command and the description for the command how to enable this feature in vscode?

    • @codewithdary
      @codewithdary  2 года назад

      That's because I've got PHP intelephense installed from the marketplace.

  • @knifersmusicjam7293
    @knifersmusicjam7293 3 года назад +2

    is this the correct way to delete or unlink including the image?
    unlink($post->image_path) ; ?

    • @codewithdary
      @codewithdary  3 года назад +1

      I prefer to use the Facade like this: File::delete($filename);

    • @knifersmusicjam7293
      @knifersmusicjam7293 3 года назад +1

      @@codewithdary wow perfect . Another idea Thank you 🙏

  • @md.abulkalamazad4965
    @md.abulkalamazad4965 3 года назад

    Great tutorials that i was really looking for.

  • @winnerwooman9787
    @winnerwooman9787 3 года назад +2

    Appreciate your time and effort Dary. My background image isn't appearing. Any help would be appreciated.

    • @AndrewComputerGK
      @AndrewComputerGK 3 года назад +2

      I created a new css file in public->css->style.css and then I loaded it app.blade.php as I've put it in a classic way without that mix crap that I don't now how it works or why is needed...

    • @codewithdary
      @codewithdary  3 года назад +1

      Carol's solution works too!

    • @HK-gu2jr
      @HK-gu2jr 3 года назад

      @@AndrewComputerGK Thank you! Problem is sovled!

  • @moonlightlunarbeam886
    @moonlightlunarbeam886 3 года назад +1

    I am a big fan of your tutorials. By the way, whenever I reload pages, loading time of app.css and app.js take too long. is there any way to solve this problem?

    • @codewithdary
      @codewithdary  3 года назад

      Maybe you can try to clear the cache of your view and route:
      php artisan view:clear
      php artisan route:cache

  • @siidsharma5349
    @siidsharma5349 3 года назад +1

    nice video, you could cover authentication

  • @llBestBoyll
    @llBestBoyll 2 года назад +1

    nice tutorial brah ❤️

  • @NiKaabir
    @NiKaabir 3 года назад

    Great job bro.. this is my first watch and made project. Thanks, u from my heart.

    • @codewithdary
      @codewithdary  3 года назад

      Awesome to hear that. I need to thank you for watching ;)

  • @stephenlau2845
    @stephenlau2845 3 года назад +1

    okay, I will try again....anyway, thank you very much....

  • @paulhanrahan6728
    @paulhanrahan6728 3 года назад

    I like this video (it's great) and need a blog, but I am at PHP 7.4. I checked the list of backward incompatibilities that should be considered when migrating from 7.4 to 8.0 of PHP. I will try to migrate and come back later.

    • @codewithdary
      @codewithdary  3 года назад

      How did it go?

    • @paulhanrahan6728
      @paulhanrahan6728 3 года назад

      @@codewithdary I found that PHP 7.4 came with Ubuntu 20.04. I also saw several people found moving to PHP 8 difficult. I will move ahead with 7.4.

  • @biodunbello3326
    @biodunbello3326 3 года назад +1

    Awesome Tutorial as always. Great Job!!!!!

  • @أمةالله-ح6ع1ط
    @أمةالله-ح6ع1ط 3 года назад +1

    It is really helpful, thanks a lot 🙏

  • @abdulfahadpangandaman6771
    @abdulfahadpangandaman6771 3 года назад +1

    Thank you sir!

  • @beatriceemanuelanpilar4586
    @beatriceemanuelanpilar4586 2 года назад

    whats the difference between the database u're using here vs using dbngin, mamp or anything else

  • @codigomovil
    @codigomovil 3 года назад +1

    Great video...
    Just one note.. you keep using text-s and text-l ... instead of text-sm and text-lg.
    Greetings from Mexico 🇲🇽

  • @harryoo5336
    @harryoo5336 3 года назад +1

    Sir I am big fan of your channel..In this project, I do as exactly as you did. but my background-image url() does not work.Is it because of my version?

    • @codewithdary
      @codewithdary  3 года назад +1

      Nope. Heard that before. You can add the background image as a style attribute, output will be the same.

  • @naveedkhan4407
    @naveedkhan4407 3 года назад

    highly underrated video

  • @MajjadeStaAna
    @MajjadeStaAna 3 года назад +1

    Thank you very much! This is incredible! Keep it up

  • @MarcosCpp
    @MarcosCpp 3 года назад

    The greatest of all times!

  • @juststudies3291
    @juststudies3291 2 года назад +1

    Thank you very much sir

  • @bigshoio
    @bigshoio 3 года назад

    Awesome! Thanks for this tutorial!

  • @yacinedia237
    @yacinedia237 3 года назад +2

    This tutorial is just amazing. Thanks for putting so much effort into it. I got an issue while edit my edit.blade.php file. The error exeptions says : Trying to get property 'slug' of non-object (View: C:\wamp64\www\firstproject
    esources\views\blog\edit.blade.php). Can you help me out please ?

    • @codewithdary
      @codewithdary  3 года назад +1

      Can you show me the line where you add ‘slug’ in your view?

    • @yacinedia237
      @yacinedia237 3 года назад +1

      @@codewithdary Here is the line : action="/blog/{{ $post->slug }}"

  • @kemalselcuk4755
    @kemalselcuk4755 3 года назад +1

    Hey Dary, very nice tutorial just finished it. I was wondering why are we using slugs, can't we just access posts through ids?

    • @codewithdary
      @codewithdary  3 года назад +1

      Yes you definitely can. But think about it right, have you ever seen a blog where they show the id? In real life examples (look online) you don't, it's always a slug. A id is always easy to showcase how it works.

    • @codewithdary
      @codewithdary  3 года назад

      Also, thank you so much :)

    • @kemalselcuk4755
      @kemalselcuk4755 3 года назад

      @@codewithdary oh yeah that makes sense. Thank you so much man you’re great!!!

  • @АнелияАхманова
    @АнелияАхманова 2 года назад +1

    thank you very much for the lesson! I got a problem at 44:31. I can't see data from the database on the page, what could be the problem?

    • @codewithdary
      @codewithdary  2 года назад

      What else are you getting?

    • @АнелияАхманова
      @АнелияАхманова 2 года назад

      @@codewithdary sorry my mistake, I made a syntax error. Thank you very much for the lesson and for the answer, your lessons helped me a lot

  • @dev_jeongdaeri
    @dev_jeongdaeri 3 года назад +1

    Super awesome 😎!!!!

  • @ghadizana
    @ghadizana Год назад +1

    hello, i want to ask, i have error when i want to create an article, the message error is : SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value
    are you have a solution for this error, what should i do? thank you

    • @codewithdary
      @codewithdary  Год назад +1

      This error message suggests that there is a missing value for the "user_id" field in a database table, and that the field does not have a default value set. In Laravel, this can be resolved by either adding a default value to the field or specifying a value when inserting data into the table.

  • @thecutedreamkostasp.4449
    @thecutedreamkostasp.4449 3 года назад +1

    That was an epic explanation! Epic tutorial! Just EPIC! I have a question! Could we do the slug operation with a mutator instead of installing an extension for this?
    Also could u do auth->user()->posts->create[] instead so u would u get user_id automatically and wouldnt add it in fillable? I am learing laravel and i think i read this on documentation Ty in advance

    • @codewithdary
      @codewithdary  3 года назад

      Well think about it. If you want to transform the title to a slug, you basically needs two PHP methods. You got the Strtolower, to have lowercase only, and you have a string replace, since you want to replace a space with a dash.

    • @thecutedreamkostasp.4449
      @thecutedreamkostasp.4449 3 года назад

      @@codewithdary exactly! Ty sir!