Skip to content
Laracoding Logo
Search
  • Backend
  • Database
  • Frontend
  • Third Party

Archives: Blog

link to How to Calculate the Average of a Column Using Eloquent

How to Calculate the Average of a Column Using Eloquent

In this post we'll create an application where users browse movies and their average rating. We'll use withAvg to calculate it and a blade view to show results.

Continue Reading
link to How to Calculate the Sum of Multiple Columns Using Eloquent

How to Calculate the Sum of Multiple Columns Using Eloquent

In this post we'll make a simple application that shows how to calculate the sum of 2 columns, by printing online_sales + in_store_sales of a specific product.

Continue Reading
link to How to Calculate the Sum of a Relation Column in Eloquent

How to Calculate the Sum of a Relation Column in Eloquent

In this post you'll use withSum to aggregate and sum a related table column. We'll make migrations, models, insert data and calculate total sales per product.

Continue Reading
link to How to Show an Image From Storage in Laravel Blade

How to Show an Image From Storage in Laravel Blade

Laravel expects images to be served from the public folder. In this guide you'll learn two methods to overcome this and display images from the storage folder.

Continue Reading
link to Using Switch Case in Laravel Blade (With Example)

Using Switch Case in Laravel Blade (With Example)

This post will guide you through creating an app that uses @switch @case @default. We'll create a model, migration, controller, view, route and factory+seeder.

Continue Reading
link to How to Order By Relationship Count Using Laravel Eloquent

How to Order By Relationship Count Using Laravel Eloquent

This post shows how to build an app that orders posts by their number of comments. We'll add models, relations, testdata and a page that shows the sorted posts.

Continue Reading
« PREV Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 … Page 15 NEXT »

About Us

Laracoding.com is a blog created to help Laravel enthusiasts of all levels to develop their skills. The blog is run by Johan van den Broek, a seasoned Laravel developer who is passionate about sharing his knowledge to make Laravel development more accessible to everyone.

Legal Disclaimer

Laracoding is owned and operated by VisionFlow Media, a company owned by Johan van den Broek, based in Lieren, the Netherlands.

    Laracoding Logo

    Contact

    Veldbrugweg 8
    7364 AE Lieren
    The Netherlands

    +31(6) 12475245
    info@laracoding.com

    More information

    • About Laracoding
    • About Johan van den Broek

    Help

    • Privacy Policy
    • Contact
    • Sitemap

    © 2025 VisionFlow Media
    • LinkedIn
    • Twitter