[0:00] Welcome back to the channel. [0:02] If you are a Laravel developer, this [0:04] video is for you. [0:06] Today, we are going to talk about [0:08] Laravel 13, which is released recently [0:11] on March 3rd week, 2026. [0:16] In this video, I will explain you the [0:18] main updates in simple way, including [0:20] new features, improvements, and removed [0:23] items with a clear examples. [0:26] The best part, [0:27] Laravel 13 has no breaking changes. It [0:30] is one of the easiest major Laravel [0:33] upgrades, and many apps can be upgraded [0:37] very quickly. [0:39] But, there is a still many exciting [0:41] updates like AI features, especially [0:45] uh passkey authentication, web socket, [0:48] web socket improvements, and PHP [0:50] attributes. [0:53] Let's get started. [0:55] Now, the agenda. [0:57] What we will cover in this video. What [1:00] we will cover today. [1:02] This video has 10 main sections. If you [1:05] can see, [1:08] PHP attributes, [1:10] release overview, [1:11] cache queue updates, JSON API resources, [1:13] Laravel AI SDK, especially. [1:17] Right? That is the powerful feature of [1:20] Laravel 13. That is nothing but AI SDK. [1:24] I hope [1:25] in future releases also, in every [1:29] Laravel new version release, definitely [1:31] they will integrate AI and AI related [1:34] integrations, I'm sure. [1:36] Because everyday AI today in the market. [1:39] Right? Like you can see other other [1:41] features also, passkey authentication, [1:43] and what removed, what is deprecated. [1:45] Right? Let's talk about this. [1:48] So, let's have a overview of the [1:51] release. [1:53] So, Laravel 13 was released on March 17, [1:56] 2026. [1:57] PHP 8.3, that is a minimum requirement. [2:00] There is no breaking changes. Bug fixes [2:03] support is available until Q3 2027, as [2:06] well as the security fixes support is [2:08] available up to Q1 2028. Maybe around 2 [2:11] years is there. Now, let's talk about [2:14] the [2:15] the big feature, that is nothing but [2:17] native PHP attributes. This is also [2:20] called hash bracket syntax. If you don't [2:22] know, don't worry, I will create [2:24] separate video on what is a hash bracket [2:26] syntax, how that is work. [2:28] So, this hash bracket syntax is [2:30] introduced in PHP 8 version. [2:33] But, Laravel did not use them much [2:35] before. Now, Laravel 13 uses them in a [2:39] much better way. [2:42] So, what is the syntax will do? We just [2:44] if we can observe, before Laravel 12, [2:46] after Laravel 13. [2:48] Can you see in Laravel 12, we have a [2:51] model. In that model, we are defining [2:53] the properties like table, primary key, [2:55] key type, increment, fillable, casts, [2:58] hidden, and lot of things we can define. [3:00] But, they're all inside the class. But, [3:02] if you can see Laravel 13, what is [3:05] there? [3:07] Much of the configuration can be written [3:10] using PHP attributes just above the [3:12] class. [3:14] All these properties are going to become [3:16] into a configuration, which are going to [3:19] be defined inside hash bracket syntax. [3:22] This keeps the class very clean and [3:24] makes you main logic very easier. So, [3:27] what we will do? Any logic you want [3:29] Right, you can write that in the class. [3:31] And we don't want to write those [3:33] properties inside the class. [3:35] The best part is, one thing remember, [3:37] this feature is optional. Old code will [3:39] work still without any changes. [3:42] But, my suggestion, we are using Laravel [3:44] 13, so let us go with Laravel 13. [3:48] So, we don't know what is going to be [3:49] happen in future. So, but as of now, [3:52] both are compatible. If it is a Laravel [3:54] 13 version, you can use [3:56] the eloquent model how you define [3:59] previously, [4:00] or now you can use the same 13 way, that [4:02] is nothing but hash bracket syntax. You [4:05] can exactly we can use this hash bracket [4:07] syntax. [4:09] The PHP attributes not only for eloquent [4:11] models, and they are available many [4:14] places. [4:16] Some common examples if we can see, we [4:17] just now we seen eloquent models for [4:20] defining the tables, primary keys, [4:21] fillable, casts, and all for defining, [4:23] we can use the eloquent models. Not only [4:25] this, [4:26] for working with artisan commands also, [4:29] in artisan commands where we can define [4:30] the signature and description, [4:32] and jobs, some job classes are there to [4:36] set the queue connections, so queue [4:38] name, and retry attempts. [4:42] We have event listeners, define which [4:44] event listener should handles. [4:46] So, we can all define notifications, [4:48] mailables, broadcast events, all of the [4:52] configuration, [4:53] all of these related configurations, we [4:55] can keep into this hash bracket syntax. [4:58] These are the some common places. [5:00] Definitely, I'm sure in upcoming [5:02] sessions, we will discuss about this. [5:04] And one more thing, these all attributes [5:07] are 100% optional. [5:09] Now, the next one, Laravel AI SDK. [5:14] The Laravel AI SDK was in beta before, [5:17] but from this latest release, it is a [5:20] stable and ready to use for production. [5:24] It is an official Laravel package [5:26] that gives you a simple and common way [5:29] to work with the AI providers like [5:31] OpenAI, Anthropic, and Gemini, and other [5:34] AI providers. [5:36] So, we can work with them very easily [5:37] without using any third-party package. [5:40] This Laravel AI SDK package is provided [5:43] by the Laravel itself. We don't want to [5:45] go for any third-party. [5:47] So, the as of now, we can see some of [5:49] the powerful features, text generation [5:52] with AI agents, image generation, audio [5:55] and text-to-speech, [5:58] and embeddings, and vector search. All [6:00] how we are doing? So, with just with the [6:03] help of prompts, we are generating all [6:05] these things, right? Definitely, these [6:07] features are going to be available in [6:09] Laravel also with this package. If you [6:13] want to implement AI-powered search [6:16] functionalities in your website, [6:18] definitely, this package will makes a [6:21] blow. I'm I'm sure [6:23] in future also, any new releases coming [6:27] from Laravel, definitely, they will come [6:29] with new integrations for AI. [6:31] I'm sure. [6:32] Every release, you know, we are in 13, [6:34] maybe 14, 15, 16, every new release, [6:38] definitely, they will come with a new AI [6:40] integrations. So, [6:43] If you can see, Reverb database [6:46] driver. [6:48] This is a very useful update in Laravel [6:50] 13 about this Reverb [6:52] database driver. [6:54] Laravel Reverb is a Laravel's official [6:56] web socket server. [6:58] Earlier, if you wanted to run Reverb on [7:01] multiple servers, you need Redis [7:03] database for this to messages between [7:06] the multiple servers, to communicate [7:07] between the multiple servers. Now, [7:09] Laravel 13 adds a new database driver [7:12] for Reverb. [7:13] This means you can use MySQL or [7:16] PostgreSQL instead of Redis. [7:19] So, we don't want to do anything. Just [7:20] you see, before Redis, after Redis. [7:23] So, there is a scaling inside we have [7:25] driver property, there you set Redis. [7:27] Now, you can see in the after Laravel [7:30] drive after Laravel 13 database driver, [7:32] if you can see the section, [7:34] driver is database. [7:37] What is the database you are working [7:38] with? The database it will connect [7:39] automatically. [7:41] So, we don't want to do anything. You [7:43] only need to change one config value [7:45] from the Redis to database, that's all. [7:47] Which one you are using by default, it [7:49] will continue with that. So, we don't [7:51] want to work hard here. So, for this [7:54] especially for the Reverb database, this [7:56] is a very nice fix coming from the [7:58] Laravel. [8:01] So, this is why this is helpful means, [8:03] no need to install Redis in smaller [8:05] projects. [8:06] Easier to set up and manage. You can use [8:09] your existing database. No need to go [8:12] for any other. Good enough for many [8:15] Laravel applications. For very large [8:17] apps, still Redis is faster. [8:20] But, for most projects, [8:22] the new database driver is great option. [8:25] Let's talk about the next feature, that [8:26] is nothing but a passkey authentication. [8:30] Laravel 13 is now support passkey [8:32] authentication directly [8:34] in starter kits [8:36] and a Fortify. [8:38] Earlier, we have to take some [8:40] third-party libraries help to do this, [8:43] but now we don't want to go for any [8:45] third-party. [8:46] So, it is available inside Laravel [8:49] itself directly. What are the passkeys? [8:51] Let me explain you. Passkeys are a [8:54] modern replacement of passwords. [8:56] Generally, we will type the passwords. [8:58] Instead of typing passwords, user can [9:01] log in using Face ID, fingerprint, [9:04] Windows Hello, hardware security keys [9:06] also. [9:08] Definitely, this is going to be more [9:10] useful. Why this is more useful? [9:12] Biometric login works out of the box. [9:15] Hardware keys are also supported. No [9:18] extra packages are required. That is [9:20] very important. Passkeys use public key [9:23] security. [9:25] The public key is stored on server, [9:27] but the private key stays safely on [9:31] user's device. [9:33] This makes login more secure and [9:35] protects the [9:37] protects it against the phishing [9:38] phishing techniques and everything, [9:40] whatever it is. [9:43] One of the powerful mechanism that is [9:44] passkey authentication. You believe me [9:47] or not, recently, I have implemented [9:49] passkey authentication for iPhone [9:52] uh in one of my projects. [9:54] So, people are slowly the people are [9:55] asking these features. That's why these [9:58] people also introduced this [9:59] authentication. The next new feature is [10:02] cache and queue enhancements. What is [10:04] this? Laravel 13 introduced there is a [10:07] method called cache a touch. [10:09] It lets you to extend the cache expiry [10:12] time without reloading or changing the [10:15] cache data. [10:16] You see that powerful feature. But [10:18] earlier what is happening? If you wanted [10:21] to keep cache data alive, you had to [10:24] reload and save it again. [10:26] Or let it expire. [10:28] Now you can simply update the TTL for [10:31] the same cache key. [10:34] This is useful for active users session [10:37] like caching and keeping frequently used [10:40] data fresh. [10:42] The next feature. [10:44] JSON API resources and security. What [10:48] exactly this is? Simply says Laravel 13 [10:50] has a built-in JSON API resource [10:53] support. We don't want to go for any [10:55] third party again. It automatically [10:57] handles the correct formatting, field [11:00] selection, relationships, and headers [11:02] and everything. [11:03] No need for extra packages or manual [11:06] setup to work with this JSON API in [11:08] future. In Laravel 13 specially. [11:10] CSRF protection is improved provided a [11:13] middleware [11:14] to improve the CSRF protection. The [11:17] middleware name is prevent request [11:19] forgery. [11:20] We can check this also. It checks both [11:23] the token and the request origin for [11:26] better security. Next one. [11:28] Teams, bug fixes, and other additions. [11:31] Laravel 13 brings back the teams [11:33] feature. It is back with a better [11:36] structure. [11:37] This helps you to build apps with the [11:40] multiple teams, user management, roles [11:43] and permissions, and the team switching. [11:46] This is a very useful SaaS application. [11:49] Laravel 13 fixes an important MySQL [11:52] issue. [11:53] Before [11:54] if you use a delete with join [11:57] the order by and limit options are [12:00] ignored. [12:02] Because of this, Laravel could delete [12:04] all matching records instead of only the [12:07] required few. [12:09] Now this problem is fixed. Still after [12:12] upgrading, test your delete queries [12:14] carefully. [12:16] STR factory reset test. This is also an [12:20] issue and it is also fixed in Laravel [12:21] 13. [12:23] Before, if one test changed the STR [12:26] factory behavior, that change could [12:29] affect other tests also. And create [12:32] confusing errors. Now Laravel reset it [12:35] automatically after each test. [12:39] Next one more thing. Semantic vector [12:41] search. In Laravel 13 adds where vector [12:45] similar to method [12:47] to the query builder. [12:49] This allows semantic search with [12:52] PostgreSQL [12:53] and PG vector. [12:55] It is useful for AI features like [12:58] embedding base search. [13:01] Next one. The verification email [13:04] improvements. [13:06] Laravel 13 also improves the subject [13:09] lines of verification emails and [13:11] password reset emails. [13:14] They now follow modern email [13:16] capitalization style. It is a small [13:19] change, but it makes Laravel looks more [13:22] polished really. [13:25] Now let us talk about what was dropped [13:28] in Laravel. I mean what is removed. [13:31] Right? What are the breaking changes? [13:33] And let us see. PHP 8.0 is removed for [13:36] the support. Definitely you have to go [13:37] 8.3 or higher. Verify CSRF token has [13:41] been replaced with the prevent request [13:43] forgery. [13:45] Laravel 13 makes small changes to how [13:48] some cache data is stored. But most apps [13:52] will not notice this. But if you cache a [13:55] complex object, test carefully. Cache [13:57] session naming defaults and name [14:00] arguments stability removed. Now the [14:04] next one is going to be upgrading [14:06] to Laravel 13. So most of the Laravel [14:10] apps now 12. [14:13] So how we can upgrade this? [14:16] First make sure your project is using [14:18] 8.3 version or higher. So find the PHP [14:21] version by using PHP hyphen V. [14:24] You'll get the latest version. As well [14:26] as update the composer.json. So in that [14:28] composer.json we have version with caps [14:30] 12.0. Just change this to cap 13.0 and [14:33] run composer update. Just if you can run [14:36] composer composer update Laravel [14:37] framework, it will [14:39] take the latest version of the Laravel. [14:41] Also review the custom CSRF middleware [14:45] if it is added in it. [14:49] So test on staging. Definitely you have [14:51] to test the application and use Laravel [14:54] Shift. That is optional for bigger [14:56] projects you can use Laravel Shift. It [14:58] helps you to automate the upgrade. [15:01] And creates a pull request with [15:03] suggested changes actually. That's the [15:05] best option. Look at the key takeaways. [15:08] There is no breaking changes. 8.3 is [15:10] required. [15:12] PHP attribute that is a new feature [15:13] implemented. Now the support is [15:16] available implemented in Laravel 13. [15:18] Laravel AI SDK. One of the powerful new [15:22] feature is also added. And passkey [15:24] authentication. [15:26] Reverb can now use MySQL PostgreSQL [15:30] instead of Redis. Laravel 13 brings many [15:34] useful improvements and makes [15:36] development even better. [15:38] Yeah, this is all about Laravel 13 [15:40] updates. You can also check the official [15:42] Laravel 13 docs and upgrade guide. [15:46] Let me know in the comment section which [15:48] Laravel 13 feature do you like the most? [15:52] Yeah. If this video is helpful to you, [15:55] please like and subscribe. [15:57] See you in the next video. Thank you.