惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
SecWiki News
SecWiki News
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
Jina AI
Jina AI
N
Netflix TechBlog - Medium
GbyAI
GbyAI
IT之家
IT之家
Apple Machine Learning Research
Apple Machine Learning Research
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
C
Cybersecurity and Infrastructure Security Agency CISA
I
Intezer
T
Tor Project blog
P
Palo Alto Networks Blog
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
Cloudbric
Cloudbric
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
Forbes - Security
Forbes - Security
Last Week in AI
Last Week in AI
S
Security Affairs
博客园 - Franky
F
Fortinet All Blogs
量子位
M
MIT News - Artificial intelligence
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
S
Secure Thoughts
V
Visual Studio Blog
AI
AI
美团技术团队
B
Blog RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
人人都是产品经理
人人都是产品经理
Microsoft Security Blog
Microsoft Security Blog
T
Threatpost
Cyberwarzone
Cyberwarzone

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Doppar vs Laravel: A Brutally Honest PHP Framework Comparison (2026)
Francisco Na · 2026-04-23 · via DEV Community

Every syntax. Every feature. One winner.

PHP frameworks have matured enormously over the past decade — and Laravel has long dominated the conversation. But a new challenger has entered: Doppar, built from the ground up for clarity, performance, and zero bloat.

This post does a deep, side-by-side comparison of both frameworks across real-world features — with actual code examples — so you can decide which one belongs in your next project.

Routing & Controllers

Laravel

// routes/web.php
Route::post('/user/store', [UserController::class, 'store'])
    ->middleware('auth');

Enter fullscreen mode Exit fullscreen mode

// UserController.php
public function store(Request $request, UserRepositoryInterface $repo)
{
    // $repo must be bound in a ServiceProvider elsewhere
}

Enter fullscreen mode Exit fullscreen mode

Doppar

#[Route(uri: 'user/store', methods: ['POST'], middleware:['auth'])]
public function store(
    #[Bind(UserRepository::class)] UserRepositoryInterface $userRepository,
    Request $request
) {
    // Binding is declared RIGHT HERE — no ServiceProvider needed
}

Enter fullscreen mode Exit fullscreen mode

Doppar uses PHP 8 attributes to co-locate the route definition, middleware, and dependency bindings all in one place. There is no hidden magic, no separate route file to cross-reference, and no service provider to update.

Doppar’s #[Route] + #[Bind] combination is genuinely more expressive and self-documenting. Everything you need to understand a controller action is visible in one place.

Dependency Injection

Laravel

// AppServiceProvider.php
public function register(): void
{
    $this->app->bind(UserRepositoryInterface::class, UserRepository::class);
    $this->app->bind(PaymentInterface::class, StripePaymentService::class);
}

Enter fullscreen mode Exit fullscreen mode

// Controller
public function checkout(
    UserRepositoryInterface $users,
    PaymentInterface $payment
) {
    // bindings resolved from ServiceProvider
}

Enter fullscreen mode Exit fullscreen mode

Laravel requires all interface-to-concrete bindings to be registered in a ServiceProvider. This is the established pattern, but it means navigating between multiple files to understand what gets injected where.

Doppar

#[Route(uri: 'checkout', methods: ['POST'])]
public function checkout(
    #[Bind(UserRepository::class)] UserRepositoryInterface $users,
    #[Bind(StripePaymentService::class)] PaymentInterface $payment,
    Request $request
) {
    $user = $users->find($request->user_id);
    $payment->charge($user, $request->amount);
}

Enter fullscreen mode Exit fullscreen mode

Doppar’s #[Bind] attribute resolves the binding inline at the injection point. No service provider. No separate config. Every dependency is visible exactly where it is consumed.

The inline #[Bind] is a paradigm shift. It eliminates the "where is this bound?" problem entirely. Doppar's DI is not just different — it is architecturally cleaner.

Request Handling & Input Processing

Laravel

public function store(Request $request)
{
    $title = ucfirst(trim($request->input('title')));
    $tags  = is_string($request->input('tags'))
        ? explode(',', $request->input('tags'))
        : $request->input('tags');
    $slug  = Str::slug($title);
    abort_if(strlen($slug) === 0, 422, 'Invalid slug');
    Post::create(compact('title', 'tags', 'slug'));
}

Enter fullscreen mode Exit fullscreen mode

Laravel’s Request is a solid input carrier. But transformation, contextual derivation, and assertions require manual, imperative code spread across the controller.

Doppar

public function store(Request $request)
{
    $data = $request
        ->pipeInputs([
            'title' => fn($v) => ucfirst(trim($v)),
            'tags'  => fn($v) => is_string($v) ? explode(',', $v) : $v,
        ])
        ->contextual(fn($data) => [
            'slug' => Str::slug($data['title']),
        ])
        ->ensure('slug', fn($slug) => strlen($slug) > 0)
        ->only('title', 'tags', 'slug');
    Post::create($data);
}

Enter fullscreen mode Exit fullscreen mode

Doppar’s Request is a full input processing pipeline. pipeInputs transforms raw values, contextual derives new fields from existing ones, ensure asserts conditions, and only extracts a clean payload — all in one fluent chain.

The request pipeline turns what is usually messy controller boilerplate into a clean, readable, composable flow. This alone can significantly reduce controller complexity in data-heavy applications.

Model Hooks / Observers

Laravel

// App\Observers\PostObserver.php
class PostObserver
{
    public function creating(Post $post): void
    {
        $post->slug = Str::slug($post->title);
    }
    public function created(Post $post): void
    {
        Cache::forget('posts.all');
    }
}
// AppServiceProvider.php — must register separately
Post::observe(PostObserver::class);

Enter fullscreen mode Exit fullscreen mode

Laravel Observers are clean but require a separate class file AND a registration call in a ServiceProvider. The logic is disconnected from the model.

Doppar — Array Style

class Post extends Model
{
    protected array $hooks = [
        'before_created' => [self::class, 'generateSlug'],
        'after_created'  => [self::class, 'clearCache'],
        'after_updated'  => [
            'handler' => AuditHook::class,
            'when'    => [self::class, 'shouldAudit'], // Conditional!
        ],
    ];
    public static function generateSlug(Model $model): void
    {
        $model->slug = str()->slug($model->title);
    }
    public static function clearCache(Model $model): void
    {
        Cache::delete('posts.all');
        Cache::delete('post.' . $model->id);
    }
    public static function shouldAudit(Model $model): bool
    {
        return $model->isDirtyAttr('title') || $model->isDirtyAttr('status');
    }
}

Enter fullscreen mode Exit fullscreen mode

Doppar — #[Hook] Attribute Style

use Phaseolies\Database\Entity\Attributes\Hook;

class Post extends Model
{
    #[Hook('before_created')]
    public function generateSlug(): void
    {
        $this->slug = str()->slug($this->title);
    }
    #[Hook('before_created')]
    public function setDefaultStatus(): void
    {
        if (empty($this->status)) {
            $this->status = 'draft';
        }
    }
    #[Hook('after_created')]
    public function notifySubscribers(): void
    {
        (new NotifySubscribersJob($this->id))->dispatch();
    }
    #[Hook('after_deleted')]
    public function clearPostCache(): void
    {
        Cache::delete('post.' . $this->id);
    }
}

Enter fullscreen mode Exit fullscreen mode

Doppar supports three hook styles — inline array callbacks, class-based hook handlers, and PHP attribute hooks — all on the same model if needed. The when conditional is a standout feature: hooks fire only when your runtime condition returns true.

Laravel has no equivalent of the #[Hook] attribute, no $hooks array, and no built-in conditional when guard. Doppar's hook system is more flexible, more expressive, and more co-located than anything Laravel offers.

Task Scheduling & Cron

Laravel

// app/Console/Kernel.php
protected function schedule(Schedule $schedule): void
{
    $schedule->command('emails:send')->hourly();
    $schedule->job(new GenerateReports)->daily();
}

Enter fullscreen mode Exit fullscreen mode

Then in your server’s crontab:

* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1

Enter fullscreen mode Exit fullscreen mode

Laravel requires editing the server’s crontab and setting up Supervisor for daemon-like behavior. Any DevOps mistake and your jobs silently stop.

Doppar

# Standard mode
php pool cron:run

# Real-time daemon mode — NO crontab needed at all
php pool cron:run --daemon

# Fully managed native daemon
php pool cron:daemon start
php pool cron:daemon stop
php pool cron:daemon restart
php pool cron:daemon status

Enter fullscreen mode Exit fullscreen mode

Doppar’s dual-mode scheduling engine runs either with a system cron OR as a self-managed background daemon. No Supervisor. No systemd. No crontab editing required. The framework manages PID tracking, SIGTERM/SIGINT handling, error recovery, and logging internally — and supports second-level task granularity, which crontab-based approaches can never achieve

Become a Medium member
Doppar eliminates DevOps complexity entirely. The same command works identically in local development, staging, and production — with zero server configuration.

Frozen Services

Laravel has no equivalent. Doppar’s #[Immutable] container feature enforces a strict lifecycle boundary — services are configurable during boot and permanently frozen at runtime. Mutation is caught at the object level, not by convention.

## Lifecycle Phases

| Phase        | Description                                                                 |
|--------------|-----------------------------------------------------------------------------|
| **Phase 1: Boot**    | Configure from `config()`, `env()`, `database` — all writes allowed          |
| **Phase 2: Freeze**  | Container calls `freeze()` — properties are snapshotted and then locked      |
| **Phase 3: Runtime** | Reads work transparently — any write throws `ImmutableViolationException`    |

Enter fullscreen mode Exit fullscreen mode

#[Immutable]
class PaymentService
{
    use EnforcesImmutability;
    public string $gateway = 'stripe';
    public float  $taxRate  = 0.08;
}

// Service provider (boot window — writable)
$payment->taxRate = config('payment.tax_rate');
$this->app->singleton(PaymentService::class,
    fn() => $payment);

// At runtime — frozen, reads work, writes throw
$payment->calculateTotal(100); // ✓ works
$payment->taxRate = 0.0;
// ✗ ImmutableViolationException:
//   Cannot mutate $taxRate on [PaymentService]

Enter fullscreen mode Exit fullscreen mode

Feature Comparison

| Feature                          | PHP readonly class        | Laravel singleton   | Doppar #[Immutable]              |
|----------------------------------|--------------------------|---------------------|----------------------------------|
| Configure from config()/env()     | ✗ Impossible post-new    | ✗ Convention only   | ✓ During boot window             |
| Exception on mutation            | Generic PHP Error        | ✗ No exception      | ✓ Typed ImmutableViolationException |
| Works with ServiceProvider boot  | ✗                        | ✓                   | ✓ Designed for this              |
| Enforced at object level         | PHP engine               | ✗                   | ✓ via `__set()`                  |

Enter fullscreen mode Exit fullscreen mode

Laravel has no mechanism to enforce service immutability after boot. Doppar turns a code-review guideline into a framework-level guarantee. An entire class of silent shared-state bugs simply cannot exist.

Temporal Time-Travel ORM

Laravel has no built-in audit history. Developers bolt on observers, third-party packages, or custom solutions. Doppar’s #[Temporal] attribute gives every model a complete, queryable time machine — activated by one line.

Laravel — manual observer approach

// App\Observers\ContractObserver.php
class ContractObserver
{
    public function updated(Contract $c): void
    {
        AuditLog::create([
            'model'   => Contract::class,
            'record'  => $c->id,
            'before'  => $c->getOriginal(),
            'after'   => $c->toArray(),
            'changed' => $c->getDirty(),
        ]);
    }
}
// AppServiceProvider — register separately
Contract::observe(ContractObserver::class);
// Repeat for every model. Maintain forever.

Enter fullscreen mode Exit fullscreen mode

Doppar — one attribute, everything works

#[Temporal]
class Contract extends Model
{
    protected $creatable = [
        'title', 'status', 'amount', 'client_id'
    ];
}

// Run once — creates contracts_history table
// php pool migrate:temporal

// Your controllers don't change at all.
// History accumulates automatically.

Enter fullscreen mode Exit fullscreen mode

The complete Time-Travel API — all from one attribute:

Time-travel query — any point in time

// What did contract 42 look like on Jan 1?
$contract = Contract::at('2024-01-01')
    ->find(42);

echo $contract->status; // 'draft'
echo $contract->amount; // 5000

// Collections too — same fluent API
$actives = Contract::at('2024-06-01')
    ->where('status', 'active')
    ->orderBy('amount', 'DESC')
    ->get();

Enter fullscreen mode Exit fullscreen mode

Diff, rewind, restore

$contract = Contract::find(42);

// Structured diff between two dates
$diff = $contract->diff('2024-01-01', '2024-06-01');
// ['changes' => ['status' => ['from'=>'draft', 'to'=>'active']]]

// Read-only historical instance
$old = $contract->rewindTo('2024-01-01');
echo $old->status; // 'draft' — live record untouched

// Roll back and persist (recorded in history)
$contract->restoreTo('2024-01-01');

Enter fullscreen mode Exit fullscreen mode

Laravel offers no built-in temporal capability. The standard approach (a model observer writing to an audit table) requires a separate file, separate registration, and must be maintained for every model.

Doppar’s #[Temporal] activates the entire feature — history table, lifecycle hooks, time-travel queries, diff engine, rewind, restore, and actor tracking — with one attribute and one command.

Observable Model Properties

Laravel gives you model-level events. You hook into aftersave(), then manually check which column changed, compare old vs new, and conditionally run logic. It works but it doesn’t scale cleanly.

Doppar went a level deeper. With #[Watches], you declare reactive watchers directly on the property itself:

#[Watches(OrderStatusChanged::class)]
protected $status;

#[Watches(TriggerFraudReview::class, when: FraudThreshold::class)]
protected $total;

Enter fullscreen mode Exit fullscreen mode

The moment $order->status changes and hits the database — your watcher fires automatically with the old value, the new value, and the full model instance. No manual dirty checks. No scattered if-statements. The attribute is the contract.

What makes it stand out:

Property-level — not table-level, not lifecycle-level. Exactly the column that changed.

Conditional — attach a model method or a dedicated condition class. Watcher only fires when it should.

DI-resolved — watchers and conditions are resolved from the container. Full dependency injection, fully testable.

Repeatable — stack multiple #[Watches] on one property. Each evaluated independently.

Zero overhead — reflection runs once per class per process, result is cached. No cost for unwatched models.

Press enter or click to view image in full size

Doppar Benchmark Result

Doppar is engineered for speed from the ground up. Every repeated execution is intelligently memoized. Third-party dependencies are minimised — most features are built directly into the core.

Benchmark result: Doppar sustained 318+ requests per second with 1,000 concurrent users, a 100% success rate across 50,000 requests, and median response times below 3 seconds even under heavy database load.

That is 7–8× higher throughput than comparable Laravel benchmarks.

This is not a marginal improvement. A 7–8× throughput difference is architectural. If you are building high-traffic APIs, real-time applications, or cost-sensitive infrastructure, Doppar’s performance story is impossible to ignore.

Verdict

Laravel wins on ecosystem. If you need a massive community, years of Stack Overflow answers, thousands of packages, and battle-hardened production track record, Laravel remains the safest choice today. It has earned that position.

Doppar wins on almost everything technical. The inline #[Bind] DI, the #[Hook] attribute system, the fluent request pipeline, the native cron daemon, and the 7–8× performance advantage are not incremental improvements over Laravel — they are architectural leaps forward built on modern PHP 8 design principles.

The question is not which framework is better built — on technical merit, Doppar is genuinely impressive and outclasses Laravel in almost every head-to-head comparison. The question is whether your project needs a proven ecosystem or a performance-first, developer-experience-first architecture.

For greenfield projects in 2026? Give Doppar a serious look.

Try Doppar: doppar