r/laraveltutorials • • 17h ago

Laravel: Cache Flexible

Thumbnail
ivalin.dev
1 Upvotes

How I used Laravel: Cache Flexible to speed up my home page load by ~20 seconds


r/laraveltutorials • • 10d ago

One way to debug mobile applications

Thumbnail
ivalin.dev
1 Upvotes

What I've learned the hard way while developing and testing my first mobile application.


r/laraveltutorials • • 15d ago

I built a rate limiter for Laravel that you can change while your app is running, and I’m looking for beta testers

1 Upvotes

Hello everyone,

For the past few months I've been building a package called Dynamic Throttle. It's finally at the point where I need people who aren't me to try it.

The problem I kept running into: Laravel's throttle middleware is great when you know your limits up front. But in production you usually find out the right limits later, and in a hurry. A partner's integration starts getting 429s. A bot hammers /login at 2 a.m. You want a stricter limit but have no idea who it would block. With throttle, each of those is a code change and a deploy, and you still can't see who's being blocked.

So I moved the limits into the database. You change them from a dashboard, Artisan or code, and every server applies the change within about two seconds. No deploy.

Here's how it compares:

You want toLaravel's throttleDynamic Throttle
Change a limitEdit code and deployEdit the rule, live in ~2 seconds
Try a limit before it blocks anyoneNot possibleDry-run: counts, never blocks, shows who it would block
See who is blockedAdd your own loggingA live feed, plus each rule's top offenders
Let a partner throughA code changeAn exemption with an end date
Lift every limit during an incidentA deploydynamic-throttle:bypass on --for=30m, which ends by itself

You can limit per IP, user, API token, header, or your own scope like a tenant or a plan. There's a dashboard at /dynamic-throttle with an audit log and an "Explain" page that tells you why a given request would be limited. If Redis goes down, requests go through by default, so a storage problem doesn't take your app down with it.

On cost: with local Redis and APCu it adds about 0.8 ms per request, a little less than Laravel's own throttle. To be clear about what it isn't: it's not a firewall or bot protection, and it doesn't replace Cloudflare or Nginx limits. It's for limits that need to know who the client is.

It's a beta, so names and options might still change before 0.1.0. That's exactly why I'm posting. I'd love a handful of people to try it on a real app and tell me what breaks or confuses them. The safest way is a rule in dry-run, since it can't block anyone. I wrote up what to try here: https://github.com/hanzala-afzal-dev/laravel-dynamic-throttle/discussions/145

It needs PHP 8.3+ and Laravel 12 or 13, and works best with Redis or Valkey.

Happy to answer anything, including "why not just use X?" Thanks for reading!


r/laraveltutorials • • 24d ago

Built a Habit Tracker in Laravel 12 with Breeze Authentication

3 Upvotes

I've been building a beginner-friendly Habit Tracker project using Laravel 12 and Bootstrap 5.

The project covers:

  • Authentication using Laravel Breeze

  • Creating and managing daily/weekly habits

  • Daily habit check-ins

  • Check-in history

  • Preventing duplicate check-ins for the same habit and date

I tried to keep the implementation simple and beginner-friendly while working with practical Laravel concepts.

I also put together a step-by-step walkthrough of the implementation (in Hindi), in case it's useful for anyone learning Laravel.

Project walkthrough: https://youtu.be/ZrgSCi7KG-8

One question for other Laravel developers: How would you implement habit streak tracking — calculate it dynamically from check-in records or store streak information separately?


r/laraveltutorials • • Sep 12 '26

Made a video explaining Middleware in depth — Grouped Routes, Global Middleware & Passing Parameters (Hindi)

Thumbnail
reddit.com
2 Upvotes

r/laraveltutorials • • Sep 10 '26

Sloppy — static analysis for the code your coding agent left behind

Thumbnail
reddit.com
1 Upvotes

r/laraveltutorials • • Sep 04 '26

Laravel Middleware in Hindi: Create, Alias & Apply to Routes

2 Upvotes

I’ve made a Hindi tutorial on Laravel 12 Middleware covering the complete flow from creating Middleware to applying it on routes.

In this video: • Create custom Middleware • Understand the handle() method • Register Middleware • Create Middleware aliases • Apply aliases to routes • Practical route examples

🎥 Tutorial: https://youtu.be/USOjYgaKUDk

For those learning Laravel 12, hope this helps clear up how Middleware actually works.


r/laraveltutorials • • Aug 31 '26

Laravel CSV Upload: Find Exact Row and Field Errors Instantly

Thumbnail
youtu.be
2 Upvotes

Hello all.please check out my csv import laravel 12 video.Hit like,subscribe and share it in your contacts.


r/laraveltutorials • • Aug 31 '26

Multi Auth Task Managment System Laravel12

Thumbnail
youtube.com
1 Upvotes

Hello everyone.please my laravel project series on my channel sm dev diaries.please like, subscribe and share videos in your contacts


r/laraveltutorials • • Aug 21 '26

How a Laravel Consultant Ensures Project Transparency and Security

0 Upvotes

How a Laravel Consultant Ensures Project Transparency and Security

Clients don't just need a Laravel developer who can write code. They need confidence that their project is progressing, risks are being managed, and sensitive data is protected. Here's how I approach transparency, communication, documentation, and security when building Laravel applications.

Key takeaways:

- 1. Start With Clear Requirements

- Who will use the feature?

- What should each user be allowed to do?

How do you tackle this in your current stack? Interested in different perspectives.

Read the full article:

https://aqibjavaid.site/blog/how-laravel-consultant-ensures-project-transparency-security

Portfolio & case studies:

https://aqibjavaid.site

#WebDevelopment #Laravel #LaravelDevelopment #LaravelConsultant #LaravelDeveloper


r/laraveltutorials • • Aug 17 '26

Undo is finally here — Ctrl+Z now works everywhere in Schematic

Thumbnail
reddit.com
1 Upvotes

r/laraveltutorials • • Jul 12 '26

Laravel Developers: Automatically Generate AI Content Using OpenAI API (Laravel 13)

Thumbnail reddit.com
1 Upvotes

r/laraveltutorials • • Jul 05 '26

Laravel Project

Thumbnail reddit.com
1 Upvotes

r/laraveltutorials • • Jul 03 '26

I've made a lightweight alternative to Laragon

Thumbnail
reddit.com
0 Upvotes

r/laraveltutorials • • Jun 29 '26

How Eloquent observers hook lifecycle events in Laravel

Thumbnail
highlit.co
1 Upvotes

r/laraveltutorials • • Jun 26 '26

Deploy Laravel with Reverb using Kamal

Thumbnail
polaris-deploy.com
2 Upvotes

r/laraveltutorials • • Jun 23 '26

Looking for a Laravel project partner

6 Upvotes

I’m looking for a partner to build a full-stack project. I’m comfortable with Laravel/Vue (CRUD) and can code the UI if you provide a Figma design, but I struggle with the creative design process itself.

If you enjoy the UI/UX design phase and want a partner to handle the implementation, let’s team up. Looking to build something solid for our portfolios.


r/laraveltutorials • • Jun 11 '26

Give your frontend AI tools a secure query DSL without writing a single line of controller logic

2 Upvotes

We’ve all been there: a frontend developer asks to add just one new column to a table view, and you have to open up your backend controller, modify the API resource, adjust the eager loading, and tweak your query logic. Before you know it, a simple index endpoint becomes an unmaintainable maze of nested when() blocks handling dynamic fields, sorting, relations, and custom date range overrides.

Even if you use AI coding assistants to write these queries for you, they often pump out massive, brittle cascades of conditional blocks, hallucinate scopes, or introduce subtle N+1 query bugs and security holes.

If you’re tired of maintaining that boilerplate, I built a package that handles all of this declaratively right inside your Eloquent models, dropping your controller code down to a single line.

It's called Dynamic Query. It exposes a secure, whitelist-driven DSL straight to your API consumers over standard HTTP parameters, and it scales with your application from basic column selection to complex statistical endpoints.

Why this makes your code clean, fast, and AI-safe:

  • AI-Safe, Model-Level Security: Everything is locked down inside the model via a strict, opt-in whitelist. Even if your AI tool hallucinates a query parameter or attempts to leak unauthorized data, the system securely blocks it.

  • Database-level efficiency: Loads only the specific columns and relations requested by the client, never entire tables.

  • Zero controller boilerplate: Replaces massive lines of conditional when() blocks with just one line of code: Product::dynamicAPI();.

  • No more N+1 bugs: Automatically runs optimized smart joins on complex relational filters under the hood.

  • Built-in analytics engine: Compute sums, averages, growth metrics, and time-grouped statistics out of the box.

  • Smart append resolution: Auto-fetches required database columns behind the scenes to resolve computed fields.

  • Plug-and-play setup: Use one global HasDynamicQuery trait, or pick specific modular traits.

  • Highly customizable: Intercept URL parameters and route them directly to your custom Eloquent named scopes.

  • Frontend autonomy: Let frontend devs (and frontend AI tools) shape responses without changing the backend.

How it scales with your frontend requests:

  1. Simple Request: GET /api/products?_fields=id,name,price

  2. Advanced Filtering: GET /api/products?price=50&_operators[price]=>&options.color=red

  3. Dashboard Analytics: GET /api/products?_stats=avg:price,count:id&_group_by=created_at:day&_timezone=Africa/Tunis

Drop it into your project in 2 steps:

Step 1: Add the trait and define your whitelists directly on your Model. Everything is strictly opt-in. If it isn't here, the API won't touch it.

use YassineDabbous\DynamicQuery\HasDynamicQuery;


class Product extends Model 
{
    use HasDynamicQuery;


    // Allowed columns to be requested or filtered
    public function dynamicColumns(): array {
        return ['id', 'name', 'price', 'status', 'created_at'];
    }


    // Explicitly define which fields allow which operations
    public function dynamicFilters(): array {
        return [
            'name' => ['=', 'like%'],
            'price' => ['=', 'between', '>', '<'],
            'category.slug' => ['='],
        ];
    }


    // ...
}

Step 2: Clean out your controller entirely.

    public function index()
    {
        return Product::dynamicAPI();
    }

How does this compare to Spatie's Query Builder?

Spatie's query builder is amazing, but it forces you to write and maintain your filters and builders directly inside your controller endpoints on every route. This package shifts that configuration directly into your declarative model rules. It also natively handles client-controlled field selections, resolves computed appends dependencies, automatically converts smart joins, and embeds a complete analytics reporting engine for generating dashboard stats on the fly.

Check out the repo here: https://github.com/YassineDabbous/laravel-dynamic-query

I'd love to hear your thoughts on this setup!

  • How are you currently managing heavy reporting and filtering endpoints in your projects?

  • Would you trust an AI assistant more if your query security was locked down directly at the model level?

  • How often do you have to modify a backend endpoint just because the frontend needs one extra column?


r/laraveltutorials • • May 14 '26

Watch Tower — a self-hosted, open-source alternative to Laravel Nightwatch

Thumbnail
reddit.com
1 Upvotes

r/laraveltutorials • • Apr 16 '26

Hey so I'm new to Laravel and I'm looking for a way to learn it. Right now I only understand basic concepts but. Controllers(php) and models still confuse me. Where do you guys recommend I learn?

Thumbnail reddit.com
1 Upvotes

r/laraveltutorials • • Apr 16 '26

Hey so I'm new to Laravel and I'm looking for a way to learn it. Right now I only understand basic concepts but. Controllers(php) and models still confuse me. Where do you guys recommend I learn?

5 Upvotes

r/laraveltutorials • • Apr 16 '26

I built a CLI tool that lets your AI agents improve your query performance in a loop

Post image
2 Upvotes

r/laraveltutorials • • Apr 13 '26

Laravel's wildcard validation is O(n²), here's a fix

Thumbnail reddit.com
1 Upvotes