Back to all funny docs

# Laughter Logs 😃

Warning: May cause actual learning AND laughter!

Laughter Logs 😃

Release Versionology 🤓

Welcome, brave coders! This is where we break down the nitty-gritty details of our versioning scheme. You know, for those who enjoy a good number crunch and can’t resist the thrill of deciphering release codes like some sort of software detective 🕵️‍♂️.

Support Policy 🤝

Ah, our support policy! The heart and soul of Laravel’s customer service. Here we lay down the ground rules for how we’ll help you navigate through this beautiful journey together ❤️. Keep in mind, our support team is like a trusty sidekick - always there when you need them, but not about to babysit your every move 😉.

Laravel 13 🚀

And now, folks, we present to you the latest addition to our superhero roster - Laravel 13! With new features that’ll make your coding heart skip a beat and performance enhancements that’ll make your server grin ear-to-ear, this release is sure to leave an indelible mark on web development history 💥.

So sit back, relax, and let the code flow! We’ve got your back, and we can’t wait to see what amazing things you’ll create with Laravel 13 🎉!

The Laravel Versioning Jamboree! 🎉🎈

Get ready for the wild ride that is Laravel versioning! Just like a circus, we’ve got acts coming up every year (around Q1) with our major framework releases. But don’t worry, unlike clowns, we won’t disappear and leave you hanging - these are our BIG TOP shows! 🎪

Now for the supporting acts - minor and patch releases. These little stars perform weekly, bringing updates and improvements to keep our big show running smoothly. And here’s the best part: Unlike those sleight-of-hand magicians who make you think they’ve taken something away, we promise these smaller releases will never introduce any breaking changes! 🔄

So when it comes to referencing Laravel or its friendly sidekicks (a.k.a components) in your application or package, remember to use a version constraint, like ^13.0. This will ensure that you and your code are on the same page, even during our major releases where some old routines may be replaced with new, improved ones! 🕺️

But don’t fret - we’re committed to ensuring that moving up to a new major release is as effortless as a magician pulling a rabbit out of a hat. You can update in one day or less and continue the show without missing a beat! 🐰✨

Ah, the delightful world of Named Arguments! A veritable smorgasbord for those who fancy themselves as avant-garde PHP coders. But beware, dear Laravel traveler, for these aren’t your garden-variety arguments. They’re not even your posh, black-tie affairs. Oh no, they’re the glamorous, jet-setting celebrities of the function world!

In Laravelville, named arguments are a bit like those boldface names who can show up at any event, in any order, and still be recognized by the paparazzi (or in this case, the PHP interpreter). But, as with Hollywood, change is constant. The siren call of code optimization may lure our developers into renaming these stars, so when calling Laravel methods, tread carefully!

Remember, it’s a bit like inviting your eccentric, rearrange-the-furniture-at-will friend over for dinner. You might think you’ve invited Cheese before Wine, but they could just as easily arrive in the opposite order. And while we appreciate your adaptability, it’s best to expect the unexpected when dealing with named arguments.

In a nutshell: Named arguments are here to add a touch of pizzazz to your Laravel functions, but don’t be surprised if they decide to switch dance partners one day! 💃🕺

Laravel Support Policy: A Tale of Updates, Fixes, and Good Times! 🎉🎊

Welcome to the Laravel Support Party Central! Here’s a fun rundown of when we’ll be dropping bug fixes and security patches like it’s hot. 🔥🍔

Laravel Releases: The Fix-a-Palooza 🎧🤘

For each Laravel release, we guarantee bug fixes for a whopping 18 months! And for your peace of mind, security fixes are on the menu for a generous 2 years. It’s like having your very own tech support squad, minus the pesky overtime charges. 🕰️💰

But, remember: only the coolest, latest major release gets all the love when it comes to additional libraries. You know what they say - “Treat ‘em mean, keep ‘em keen!”

Database Version Support: Let’s Get Connected! 🤝💻

Now, let’s not forget about our database buddies. Check out the database versions that we heartily support, because a happy Laravel needs a happy DB!

The Time Table: When to Expect Updates 🕰️📅

Here’s a fun table to help you plan your Laravel updates and parties! (Because who doesn’t love a good party?)

Release NamePHP (*)Launch DateBug Fixes UntilSecurity Fixes Until
Lara-Love8.1 - 8.3Valentine’s Day, 2023Summer Solstice, 2024New Year’s Eve, 2025
Laravel XIII8.2 - 8.4St. Patrick’s Day, 2024Halloween, 2025St. Patrick’s Day, 2026
Lara-Luxe8.2 - 8.5Valentine’s Day, 2025Summer Solstice, 2026New Year’s Eve, 2027
Laravel XIV8.3 - 8.5St. Patrick’s Day, 2026Q3 2027St. Patrick’s Day, 2028

(*) Supported PHP versions

So grab your popcorn and get ready for a rollercoaster ride of updates! And remember: with Laravel, you’re never left high and dry - we’ve got your back (and your databases) covered. 🎢🌭🎉

Alrighty then! Buckle up, coders! Laravel 13 is here to rock your world with its spiffy new features, all while keeping the annual release tradition alive like a well-oiled robot at a disco. This time around, we’re serving up AI-native workflows, stronger defaults that’ll make your grandma’s knitting look amateurish, and developer APIs so expressive they could give Marlene Dietrich a run for her money!

First off, we’ve sprinkled in some first-party AI primitives that’ll make you feel like a digital Sherlock Holmes. No more guesswork or googling for hours on end – our smart AI will help you solve cases faster than Columbo could say “Just one more thing…”

Next up, we’ve got JSON:API resources that’ll have you feeling like Tony Stark when he first donned his Iron Man suit. They’re sleek, powerful, and ready to conquer the vast digital universe.

We’ve also added semantic/vector search capabilities that make Google’s algorithm look like a calculator from the 1800s. Say goodbye to endless scrolling and hello to finding exactly what you need with a single query.

Finally, there are incremental improvements across queues, cache, and security that’ll make your life easier than watching paint dry on a wall. They’re the unsung heroes of this release – working tirelessly behind the scenes so you can focus on more important things (like perfecting your cat meme collection).

So gear up, dear developers! Laravel 13 is here to make your coding life a breeze, or at least as breezy as it can be when dealing with servers and databases. Happy coding!

Alright, folks! Buckle up, because we’ve got some exciting news that won’t buckle your code! After a tireless year of behind-the-scenes tinkering and under-the-hood polishing, we’re proud to present Laravel 13 – the upgrade that’s as easy on your application as a well-timed dad joke is on your nerves.

Fear not, breakers of the internet! We’ve been diligently minimizing those pesky breaking changes, so you can focus on building awesome things without having to rebuild them entirely. Our mission? To deliver a steady stream of life-enhancing updates throughout the year that leave your existing apps unscathed and ready for their close-ups.

So, what does this mean for you and your trusty Laravel sidekick? Well, upgrading to Laravel 13 is about as much work as teaching a cat to play the harmonica – relatively minimal effort, but still delivers a surprising amount of new tricks!

Now, grab your popcorn and dive into the goodies we’ve cooked up for you in this release. But first, a quick detour through the world of PHP 8…

PHP 8 Compatibility

Yes, you read that right! Laravel 13 plays nicely with PHP 8, meaning you can enjoy all the sweet performance improvements and shiny new features that come with it. Don’t worry, we won’t force you to dance with PHP 8 just yet – but when you’re ready to hit the dance floor, we’ll be there with bells on (or rather, with improved code execution speeds).

So go ahead and prepare your applications for a smooth upgrade to Laravel 13. With minimal effort, you’ll unlock a world of new possibilities, without having to say goodbye to your favorite cat videos!

Long live the harmony of cats and harmonicas – and long live Laravel!

Ahoy there, Laravel adventurers! Listen up, as we embark on a journey that’s smoother than Captain Jack’s sea shanties and more exciting than a treasure chest full of code gold: Laravel 13.x! But before we set sail, let’s ensure our ship is in tip-top shape by checking the minimum requirements.

First things first: it’s time to upgrade your PHP version to a sprightly 8.3! Yep, you heard that right - no more creaky old ships for us! This shiny new PHP version will power your Laravel app faster than a bottle of Kraken rum at a pirate party.

Now, before you start hoisting the mainsails and swabbing the decks, remember to update your composer.json file with the latest Laravel package versions. It’s like applying fresh tar and feathers on our ship - it’ll keep the scallywags at bay!

So grab your eyepatches and buckle up for a voyage full of adventures and improved code efficiency. Happy sailing, matey! Arrrgh, Laravel 13.x awaits!

Ahoy, Laravelers! Buckle up as we embark on a fantastic voyage into the realm of the Laravel AI SDK, version 13’s pièce de résistance! This nifty toolkit is like the Swiss Army knife of AI – text generation, command-calling agents, embeddings, audio, images, and even vector-store integrations are all at your fingertips!

Imagine building provider-agnostic AI features without having to learn a new programming language or master a secret handshake. You can now create a basic agent with just one call:

use App\Ai\Agents\SalesCoach;

$response = SalesCoach::make()->prompt('Analyze this sales transcript...');

return (string) $response;

That’s right, folks! Our AI SDK is so easy to use that even a salesperson can make it work. 🤖📞

But wait! There’s more! The Laravel AI SDK doesn’t just talk the talk – it walks the walk (or rather, generates images and audio). For visual generation scenarios, our SDK offers a neat API for creating images from plain-language prompts:

use Laravel\Ai\Image;

$image = Image::of('A donut sitting on the kitchen counter')->generate();

$rawContent = (string) $image;

And for voice experiences, you can synthesize audio so lifelike that you’ll think Siri and Alexa are having a friendly argument over who gets to be our AI’s BFF:

use Laravel\Ai\Audio;

$audio = Audio::of('I love coding with Laravel.')->generate();

$rawContent = (string) $audio;

Lastly, for semantic search and retrieval workflows, our SDK can generate embeddings directly from strings:

use Illuminate\Support\Str;

$embeddings = Str::of('Napa Valley has great wine.')->toEmbeddings();

In short, the Laravel AI SDK is like the dream assistant you’ve always wanted – and now it’s here to make your coding life easier (and more fun) than ever before! 🚀🎉🤖🚀

The Incredible Edible JSON:APIs! 🍔 API! 🎶

Get ready to party like it’s 2016 (well, technically, you can party anytime with Laravel) because we’ve got a snazzy new feature that’ll make your life a whole lot easier: First-Party JSON:API Resources! 🎉🚀

Now, you might be thinking, “What on earth is a JSON:API resource?” Well, let’s take a little journey together and find out. Imagine if you will, a magical box filled with all the goodness of an API response that’s been carefully crafted to comply with the enchanting JSON:API specification.

JSON:API resources are the sorcerers who wield this magic box, taking care of serializing resource objects, including relationships, serving up sparse fieldsets (just like a fancy restaurant would), linking you to other related resources, and even sprinkling in some JSON:API-compliant response headers for good measure. It’s like having your own personal API butler, always ready to serve!

So grab a (virtual) cocktail, put on your favorite dance music, and let’s get this party started with Laravel’s brand new, first-class JSON:API Resources! 🎶💃

P.S. Don’t forget your request forgery protection (because nobody likes a gatecrasher at the API party)!

The Magic Shield: Laravel’s Request Forgery Protection

In the realm of digital knighthood, where trolls lurk and cookies crumble, our noble hero, Laravel, has donned an enchanted suit of armor - PreventRequestForgery. This is not your typical medieval armor; it’s a state-of-the-art security system that protects against nefarious request forgeries while maintaining perfect compatibility with token-based CSRF protection.

Now, you might wonder what this magic shield does exactly? Well, imagine if someone pretended to be you and tried to sneakily submit a form or make a secret API call. Our trusty PreventRequestForgery would catch them red-handed, verify they’re from the right origin (not some fishy domain claiming to be your trusted friend), and chuck them back into the digital abyss from whence they came.

So, embrace the knightly spirit, Laravel style! Fortify your applications with this enchanted armor and rest assured knowing that your kingdom’s secrets are safe in these digital times. (Just remember to bake a fresh batch of cookies for your users – you don’t want them thinking they’re dealing with a troll!)

Queue Choreography: Laravel’s Star Turn! 🌟

Ahoy there, coders! Buckle up for a jolly ride into the world of Laravel 13’s glamorous queue routing, where your jobs take center stage like never before. 🎭

Now, you can orchestrate your queued tasks with the grace and precision of a maestro using Queue::route(...). It’s like having a secret director’s chair that lets you set default queue and connection rules for specific jobs right from the heart of the spotlight! 🎬

// Cue the curtain call: ProcessPodcast takes center stage on the Redis circus tent!
Queue::route(ProcessPodcast::class, connection: 'redis', queue: 'podcasts');

Now that you’ve got your star performers lined up and ready to shine, let’s dive into a magical world of attributes 🪄:

PHP Attire (Attributes) for the Stars

Just like dressing your star actors in the finest costumes, you can adorn your jobs with attributes that define their roles and responsibilities. Here’s a quick fashion show of how it’s done:

// ProcessPodcast dons its Redis cape and joins the podcast queue line!
Queue::route(ProcessPodcast::class, connection: 'redis', queue: 'podcasts');

Remember, life’s a stage, and with Laravel 13’s queue routing by class, you’re the ultimate director! Now go out there and make those queues dance! 💃🕺️🚀

Laravel 13 is like the hipster kid at the coding block party, continually leveling up its PHP attribute game across the entire framework! Now, it’s easier than ever to turn your code into a declarative, colocated masterpiece that makes your old imperative programming grandpa roll his eyes in disbelief.

The fresh additions include controller and authorization attributes like #[Middleware('auth')], perfect for those times when you want to make sure Uncle Bob is logged in before he wrecks the party (your website). Or, there’s #[Authorize('create', [Comment::class, 'post'])]—a magical spell that makes sure only authorized users can create comments on a post—just what we need to keep Spammy McSpambot from crashing our virtual soiree!

Speaking of parties, let’s not forget about the queue-oriented job controls like #[Tries], #[Backoff], #[Timeout], and #[FailOnTimeout]. Imagine having a digital bouncer that deals with failed jobs and kicks them out when they overstay their welcome! It’s like having the best party host ever—Laravel.

But wait, there’s more! Attributes have also been introduced in Eloquent, events, notifications, validation, testing, and resource serialization APIs—giving you a consistent attribute-first option in more areas of the framework than a well-stocked buffet table at a networking event.

So grab your favorite drink and join the attribute party! It’s time to let your code shine with less boilerplate and more fun. Here’s a peek into the future:

<?php

namespace App\Http\Controllers;

use App\Models\Comment;
use App\Models\Post;
use Illuminate\Routing\Attributes\Controllers\Authorize;
use Illuminate\Routing\Attributes\Controllers\Middleware;

#[Middleware('auth')]
class CommentController
{
    #[Middleware('subscribed')]
    #[Authorize('create', [Comment::class, 'post'])]
    public function store(Post $post)
    {
        // ...
    }
}

Now that’s some attribute-tacular code! 🥳🎉🔥

Time Travel for your Cache Items! 🚀🕰️

Ah, the good ol’ Laravel – where every new update is like a fresh bag of chips! And we just got a brand spanking new flavor: Cache TTL Extension! 🎉

Ever found yourself in a situation where you wanted to prolong the life of an already cached item without having to re-fetch and re-store its value? Well, my friend, your wish is Laravel’s command!

Introducing Cache::touch(...) – the magical spell that extends the TTL (Time To Live) of an existing cache item without making it leave its cozy little home in memory. It’s like giving your cached items a fountain of youth, but without the wrinkles and awkward conversations with teenagers! 🧙‍♂️✨

Now, don’t get too carried away – just because you can, doesn’t mean you should! Prolonging cache life must be done wisely to ensure your application remains zippy and responsive. So, use this power judiciously, and may your caching adventures be fruitful and fun! 🍎🚀

In a daring leap forward for the search game, Laravel 13 takes semantic searching to new heights with native vector query support! Think of it like when Chewbacca finally learned how to use a computer (spoiler alert: he’s a natural).

We’ve got embedded workflows and APIs galore, all meticulously documented for your pleasure in our search, queries, and AI SDK sections. Just imagine building AI-driven search experiences with PostgreSQL + pgvector, without breaking a sweat or losing any hair (well, maybe a few extra strands).

Now, you can even perform semantic similarity searches directly from the query builder. It’s like having Google’s AI brain but in PHP form! Check out this example:

$documents = DB::table('documents')
    ->whereVectorSimilarTo('embedding', 'The finest vineyards in Napa Valley')
    ->limit(10)
    ->get();

Just remember, it’s not magic. It’s just a super advanced algorithm that can tell the difference between “Best wineries” and “Worst fast food chains.” Pretty impressive, huh? So go forth, Laravelistas, and conquer search like never before!

Other Funny Docs

**Welcome to Laravel Land!** 🌄 # Collections 🎉🎩 # Concurrent Chaos, or How to Make Your Computer Dance Simultaneously 🕺️💃️ # Controllers: The Gladiators of the Digital Colosseum 🏆 # Database: The Magical Scroll of Infinite Data! 🧙‍♂️📖 # Eloquent: The Great Serialize-Off! 🥳🎉 # Eloquent: The Swanky Buffet of Data! 🎉🍽️ # Eloquent's Amorous Affairs: A Love Letter to Data Relations! # Hashbash 101: Laravel's Secret Sauce for Security! 🔒🎉 # Laravel's Heart Monitor 💼🕺️ # Laravel's Magical Deployment Genie: Envoy! 🧞‍♂️🎩 # Locksmith Services: Laravel's Top-Secret Spy Kit 🔑🕵️‍♂️ # The Database Dance: A Laravel Ballroom Guide 💃🏻🎉 # The Grand Ol' Setup! 🎶🥁 # The Great File Adventure! 📚 🚀 # The Great Laravel Password Adventure # The Magnificent Mongoose's Guide to Storing Data in the Land of BSON! 🦁📜 🔔📣 **Attention All Developers!** A Journey Through Laravel's File System Jungle! 🌳🔍 Ahoy there, coders and jesters alike! Brace yourself for a thrilling journey through the fantastical realm of Laravel Strings - the magic ingredient that makes your apps talk to you like a wise old sage (or a chatty parrot, if you prefer). Ahoy there, database enthusiasts! Let's embark on a fantastical journey into the heart of Laravel's mystifying seed land! Yes, you heard it right – we're talking about Database Seeding! Ahoy there, intrepid coder! Set sail for a grand adventure with Laravel's swashbuckling documentation! 🏴‍☠️ Ahoy there, Laravel sailors! Buckle up for an exhilarating journey into the realm of Eloquent API Resources. This section is chock-full of goodies that'll make your RESTful dreams come true. Let's dive right in! 🌊 Ahoy there, matey! Buckle up for a whirlwind tour of Laravel's process management! This is where the magic happens, and by "magic," we mean command line sorcery. Ahoy, mateys! Sail the Laravel seas with us as we delve into the art of mockery - not the kind that makes people laugh (although that's always a plus), but the one that helps you write better tests. Ready to plunder treasures of knowledge? Let's set sail! Alright, let's dive into the hilarious world of Laravel Licensing! 🎠🎪 Alrighty, buckle up, coding cowboy (or cowgirl)! Let's dive into the wild west of Laravel deployment where we'll tame servers, tweak configurations, and optimize for speedier draw times. But first, a quick warning: this here is more than just roping cattle, so if you ain't familiar with server requirements, Nginx, FrankenPHP, or directory permissions, best hitch a ride on the documentation horse. Anchors Aweigh! Welcome to Laravel Sail! 🚢🚀 Console Chortles: The Laugh-and-Learn Guide 🎤️ Contracts: The Sworn Code of Laravel Land! 🤝📜 Database: The Gateway to Data Nirvana 🚀🌟 Database: The Quarry Master Database: Time Machine for Your Data Eloquent: The Magic of Mutators & Casting! 🎩✨ Eloquent: The Magical Factory of Your Database Dreams! 🧚‍♂️🛠️ Eloquent: The Posh Puppy of PHP Database Frameworks! 🐶 Fancy Pants Shortcuts 🤵👗 Frontend Fun Times! 🎉🎈 HTTP Hooligans: A Survival Guide for Web Shenanigans in Laravel Land! 🤓 Laravel Cashier (Paddle): The Silicon Valley of Subscription Billing 🚀✨ Laravel Cashier: Your Buddy for Stripe Shenanigans! 💰💳 Laravel Dusk: The Web Browser Robot for Your Laravel App! 🤖 Laravel Flagship 🏳️‍🌈 Laravel Forti-Fantastic! 🎉🏰 Laravel Mix: The Magical Elixir of Your Web Application's Happiness 🍰 Laravel Octane: The Supercharged PHP Superhero! ⚡️🚀 Laravel Passport: The Magic Key to Your API Kingdom 🔑✨ Laravel Pint: Your Chill Buddy for Code Quality! 🍻 Laravel Sanctum: Your Secret Weapon for API Security! 🚀🛡️ Laravel Scout: The Sherlock of Databases! 🕵️‍♂️ Laravel's AI Sidekick 🚀🤖 Laravel's AI Time Machine 🕰️🚀 Laravel's Bag O' Tricks! Laravel's Dance Floor: A Symphony of Code! 🎶🥁 Laravel's Magical Command-Line Puppeteer (MCP) ✨🎩 Laravel's Magical Domain Whisperer: Valet! 🧙‍♂️🔮 Laravel's Magical Homestead for Developers, Wizards, and Aliens! 🏡🚀 Laravel's Magical, Shiny Socialite! 🌈✨ Laravel's Shining Star: Horizon! 🚀✨ Laravel's Stargazing Gadget: Telescope! 🔭🚀 Laravel's Swanky Navigation Guide! 🕺️ Laugh, Log, Love! 🤖 logging in Laravel 🎉 Laugh, Test, Conquer: Your Laravel Guide to Fun-tastic Testing! 🥳🎉 Laughable Laravel HTTP Hilarity! 🎭💬 Laughing at the Glitches: Laravel's Error Handling Guide! 😜 Laughter and Coding: A Journey to Laravel 13.0! (From the Stables of 12.x) Let's Chat Like Never Before with Laravel Broadcasting! 🗣️🎙️ Lingo-Magic: Make Your Laravel App Speak Every Language Under the Sun! 🌍🎙️ Middleware Mayhem! 🕹️🦸‍♂️ Package Shenanigans! 🎉🥳 Redis: The Swift, Silicon Superhero of Data Storage! 🦸‍♂️🚀 Rockstar Rate Limiting 🎸🥁🎉 Service Provider Shenanigans! 🤘 Temples of Data: Laravel's Views Temple (Don't worry, no incense required) The All-Knowing, Magic Bean of PHP Land! 🪄🚀 The Art of Email in Laravel Land! 🕵️‍♂️💌 The Art of Validation: A Laravel Masterclass! 🎉🎓 The Artisan's Playground 🧛‍♂️🔩 The Dance of Responses The Gatekeeper's Handbook (But Slightly More Entertaining) The Globetrotter's Guide to Laravel Sessions The Great Escape Act: Laravel's Magic Trick with Queues! The Great Interweb Explorer: Laravel's HTTP Client The Great Laravel Journey: A Comic Adventure! 🎉🚀 The Great Laravel Soiree: An Eventful Revelry! 🎉🎊 The Incredible Journey of Email Verification! 🚀📧 The Incredible, Mysterious World of CSRF Protection! 🦹‍♂️🔒 The Joyful Symphony of Asset Bundling: Vite Edition! 🎶 The Laravel Play-Doh Kit: Your Gateway to Fun and Fancy Web Development! 🎨🌐 The Magic Show of Laravel Lifecycle 🎩✨ The Quest for Knowledge: A Laravel Adventure! 📚🚀 The Time Travelling Task Manager (TTTM) The Wild West of Web Navigation: Laravel's Routing! 🤠🎠 Time Travel, Laravel Style! 🔮⏳ Title: **How to Contribute Like a Rockstar 🎸** Title: **Welcome to Laravel's Magical Terminal Tour!** 🎪🎧 Unleash the Power of Cache! (Or, How to Speed Up Your App Without Breaking a Sweat) Unlocking the Kingdom! (aka, Authentication in Laravel) URL Navigation: The Cosmic Wayfarer's Guide to Cyberspace! 🛸🚀 Welcome to Laravel Boost, the supercharger for your PHP applications! 🚀💨 Welcome to Laravel Land! 🌴🎉 Wickedly Wonderful Blade Templates! 🧙‍♂️🔮