DEV Community

Cover image for Laravel vs. Flight: A Guide to Picking Your PHP Framework
n0nag0n
n0nag0n

Posted on

3 1

Laravel vs. Flight: A Guide to Picking Your PHP Framework

Hey there, PHP explorer! So, you’re stepping into the world of web development and trying to pick a framework that fits your vibe. Laravel’s the big name—think of it as the fully loaded SUV of PHP frameworks, packed with features and a bold presence. But lately, some devs (like on Reddit) are muttering that it’s getting a bit too fancy and commercial. Then there’s Flight Framework: the sleek, no-fuss scooter that gets you rolling fast. Let’s dive in and see which one feels right for your next project!

What’s the Deal with Laravel?

Laravel’s been a fan favorite for ages, but with Laravel 12 hitting the scene on February 24, 2025, some folks are raising eyebrows. A Reddit thread recently popped off (over 1,100 upvotes!) with grumbles about new starter kits, third-party auth like WorkOS, and quirky stuff like Volt tossing PHP, HTML, and JS into a single-file mashup. The word is Laravel’s chasing investor bucks (cue the $57 million!) and leaving some coders dazed. If you’re just getting comfy with PHP, that might sound like more than you’re ready to tackle.

Flight: The Easygoing Alternative

Flight Framework is like that laid-back pal who keeps it simple. It’s a micro-framework—light, quick, and free of extras you didn’t sign up for. Great for anyone who wants to build something cool (like an API) without navigating a labyrinth of files or dodging sales pitches. Let’s check it out with a quick example!

Building a Simple User API: Flight vs. Laravel

Flight: Fast and Straightforward

Grab Flight with this:

composer create-project flightphp/skeleton myproject
Enter fullscreen mode Exit fullscreen mode

Start the dev server:

cd myproject
composer start
Enter fullscreen mode Exit fullscreen mode

You’re live at localhost:8000. Open app/routes.php and add:

Flight::route('GET /users', function() {
    $users = [
        ['id' => 1, 'name' => 'Johnny Code'],
        ['id' => 2, 'name' => 'Jane Dev']
    ];
    Flight::json($users);
});
Enter fullscreen mode Exit fullscreen mode

Hit /users in your browser, and bam—JSON user list, ready to roll!

  • Dependencies: Just 4 production packages (flightphp/core, flightphp/runway, symfony/translation, tracy/tracy). Barely a handful! If you want zero dependencies, you can just install flightphp/core and configure your environment yourself.
  • Files/Dirs: Around 10-15—like app/, public/, and routes.php. Easy to wrap your head around. If you want to simplify that, it's easy to just start from scratch on your own.

Heads-up: The skeleton’s pretty bare, so you might tweak a few things yourself. But it’s a clean slate to play with!

Laravel: The Whole Toolkit

Install Laravel with:

composer create-project --prefer-dist laravel/laravel myproject
Enter fullscreen mode Exit fullscreen mode

Launch the server:

cd myproject
php artisan serve
Enter fullscreen mode Exit fullscreen mode

Add your route in routes/api.php:

Route::get('/users', function () {
    return response()->json([
        ['id' => 1, 'name' => 'Johnny Code'],
        ['id' => 2, 'name' => 'Jane Dev']
    ]);
});
Enter fullscreen mode Exit fullscreen mode

Visit /api/users, and you’re set.

  • Dependencies: Dozens! laravel/framework drags in a crew—like illuminate/*, symfony/*, and more. It’s a party!
  • Files/Dirs: About 20-30, including app/Console/, database/, and resources/. A lot to explore!

Laravel hands you a ton right away—auth, database goodies—but it’s like getting a Swiss Army knife when you just need a spoon.

Flight vs. Laravel: The Lowdown

Thing Flight (Scooter) Laravel (SUV)
Learning Curve Smooth and chill, dive right in Steeper, more to figure out
Speed Quick, low overhead Slower, big engine to run
Dependencies 4—light and lean Dozens—pack a suitcase
Files/Dirs 10-15—nice and tidy 20-30—sprawling setup
Vibe Free-spirited, no sales pressure Loaded, but with a pitch

Flight’s like a blank sketchbook—you add what you want. Laravel’s more like a furnished loft—awesome if you need it all, but a lot to take in at first.

Why Flight Might Click?

If you’re itching to build something small—like a blog API or a task tracker—Flight keeps it fun and fuss-free. No third-party auth headaches, no “upgrade to Pro” nudges. It’s open-source, community-driven, and lets you explore PHP without tripping over “magic” tricks. Sure, it skips built-in auth or an ORM, but that’s your chance to craft it your way!

Why Laravel Still Shines?

Got big dreams—like a team project or an enterprise app? Laravel’s got the goods with tons of tools and a massive community. Just brace yourself for a bit more of a climb to get the hang of it.

Your Call!

So, what’s your speed? Flight’s scooter for a quick, carefree spin, or Laravel’s SUV for the long road? If Laravel’s recent twists have you side-eyeing it (thanks, Reddit!), Flight could be your chill getaway. Give that API example a whirl—it’s five minutes tops—and see what sparks joy. Happy coding, and enjoy the PHP adventure!

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (6)

Collapse
 
xwero profile image
david duymelinck

I understand why you jumped on the reddit thread to create a post.
I'm also in the camp of which direction is Laravel heading worriers.

But nothing is mandatory. You can install the framework still as a standalone part of an application.
It does come with a parts you might not need, but it is easy not to use them if you don't want to.
Dependencies in backend code are less of a problem than dependencies in frontend code.

Do you have a benchmark that compares the speed of Flight with Laravel?

Collapse
 
n0nag0n profile image
n0nag0n

Oh yeah, probably the best comparison is the tech power benchmarks https://www.techempower.com/benchmarks/#hw=ph&test=fortune&section=data-r22&l=zik073-cn3

Collapse
 
xwero profile image
david duymelinck

Thank you for the link.

One thing I noticed is that for Flight no ORM is used and for Laravel, and Symfony the ORM is used. That will skew the result.
Another thing that got my attention is that the benchmark is done at the end of 2023.

Thread Thread
 
n0nag0n profile image
n0nag0n • Edited

They keep doing test runs. This was run last week. https://www.techempower.com/benchmarks/#section=test&runid=79248506-7230-4e43-99c1-c76d9e370664&hw=ph&test=fortune

And that's true Flight didn't have an ORM at the time of that benchmark. It has one now github.com/flightphp/active-record Regardless though, if you want to take the DB out of the picture, just look at the Plaintext or JSON results at techempower. That doesn't have the DB layer, it's just raw framework performance comparison.

There's also this well known benchmark. I still need to get Flight into it but Flight is roughly a small measure more performant than fat-free. You can see Laravel falls to the bottom of this list as well. web-frameworks-benchmark.netlify.a... This benchmark though I feel is too simple so it's not a great "real-ish" world comparison.

Thread Thread
 
xwero profile image
david duymelinck

Thank you.

It looks like Symfony scores the best with in combination with swoole. Have you tested your framework with different webserver combinations?

Thread Thread
 
n0nag0n profile image
n0nag0n

Yeah, there's a PR in techempower for a workerman variant. In my on testing with swoole, I can get it about 2-3x faster with swoole.

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video