{"id":73830,"date":"2024-03-19T07:11:33","date_gmt":"2024-03-19T11:11:33","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/blog\/?p=73830"},"modified":"2024-03-19T07:11:35","modified_gmt":"2024-03-19T11:11:35","slug":"laravel-11-is-now-available","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/","title":{"rendered":"Laravel 11 is now available!"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"636\" src=\"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1-1024x636.png\" alt=\"\" class=\"wp-image-73841\" srcset=\"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1-1024x636.png 1024w, https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1-300x186.png 300w, https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1-768x477.png 768w, https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1.png 1510w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><a href=\"https:\/\/laravel.com\/docs\/11.x\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">Laravel 11<\/a>, launched on March 12, 2024,  marks a significant update to the Laravel framework, introducing a range of new features and improvements aimed at enhancing the development experience and application performance. With a focus on efficiency, security, and real-time web application development, Laravel 11 brings forward several key enhancements and introduces <a href=\"https:\/\/reverb.laravel.com\" target=\"_blank\" rel=\"noreferrer noopener\">Laravel Reverb<\/a>, a new WebSocket server for real-time communication.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#policy\">Laravel Support Policy<\/a><\/li>\n\n\n\n<li><a href=\"#php-requirement\">PHP 8.2 Requirement<\/a><\/li>\n\n\n\n<li><a href=\"#directory-structure\">Streamlined Directory Structure<\/a><\/li>\n\n\n\n<li><a href=\"#eager-load\">Eager Load Limit<\/a><\/li>\n\n\n\n<li><a href=\"#model-cast\">Model Casts as Methods<\/a><\/li>\n\n\n\n<li><a href=\"#reverb\">Laravel Reverb<\/a><\/li>\n\n\n\n<li><a href=\"#commands\">New Artisan Commands<\/a><\/li>\n\n\n\n<li><a href=\"#health\">Health Route and APP_KEY Rotation<\/a><\/li>\n\n\n\n<li><a href=\"#install\">Install Laravel 11<\/a><\/li>\n\n\n\n<li><a href=\"#upgrade\">How to Upgrade to Laravel 11<\/a><\/li>\n\n\n\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"policy\">Laravel Support Policy<\/h2>\n\n\n\n<p>Laravel&#8217;s support policy ensures that developers receive timely updates, bug fixes, and security patches for their applications. According to the policy, Laravel provides 18 months of bug fix support and 2 years of security fix support for each major release. This structured approach to version support enables developers to plan their upgrade paths effectively, ensuring their applications remain secure and up-to-date.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong>Version<\/strong><\/th><th><strong>Supported PHP<\/strong><\/th><th><strong>Release Date<\/strong><\/th><th><strong>Bug Fixes Until<\/strong><\/th><th><strong>Security Fixes Until<\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Laravel 9*<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><\/mark><\/td><td><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">8.0 &#8211; 8.2<\/mark><\/td><td><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">February 8, 2022<\/mark><\/td><td><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">August 8, 2023<\/mark><\/td><td><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">February 6, 2024<\/mark><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Laravel 10<\/td><td>8.1 &#8211; 8.3<\/td><td>February 14, 2023<\/td><td>August 6, 2024<\/td><td>February 4, 2025<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Laravel 11<\/td><td>8.2 &#8211; 8.3<\/td><td>March 12, 2024<\/td><td>September 3, 2025<\/td><td>March 12, 2026<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Laravel 12<\/td><td>8.2+<\/td><td>Q1 2025<\/td><td>Q3 2026<\/td><td>Q1 2027<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">(*) Laravel 9 has reached End of Life<\/mark><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"php-requirement\">PHP 8.2 Requirement for Laravel 11<\/h2>\n\n\n\n<p>With the release of Laravel 11, a significant shift has been made in the PHP version requirement. Laravel 11 mandates <a href=\"https:\/\/www.php.net\/releases\/8.2\/en.php\" target=\"_blank\" rel=\"noreferrer noopener\">PHP 8.2<\/a> as the minimum version, aligning the framework with the latest features, performance improvements, and security enhancements offered by PHP 8.2. This decision underscores Laravel&#8217;s commitment to leveraging the most current and robust technologies available, ensuring developers can build highly efficient, secure, and innovative applications.<\/p>\n\n\n\n<p>PHP 8.2 introduces numerous new features and optimizations that can significantly benefit Laravel applications. These include enhancements to object-oriented programming, new types and attributes that encourage better coding practices, and performance improvements that can lead to faster application execution. By requiring PHP 8.2, Laravel ensures that all applications built on this version will inherently take advantage of these improvements, leading to more reliable and performant web solutions.<\/p>\n\n\n\n<p>Developers planning to upgrade to Laravel 11 or start new projects with it must ensure their server environments are updated to PHP 8.2. This update not only facilitates compatibility with Laravel 11 but also positions applications to benefit from PHP&#8217;s active support, including security fixes and performance optimizations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"directory-structure\">Streamlined Directory Structure<\/h2>\n\n\n\n<p>Laravel 11 simplifies its directory structure, reducing the initial complexity for developers. Notably, <code>Kernel.php<\/code> files have been removed, and middleware can now be directly added in the <code>bootstrap\/app.php<\/code> file. <\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">app.php<\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;?php\n\nuse Illuminate\\Foundation\\Application;\nuse Illuminate\\Foundation\\Configuration\\Exceptions;\nuse Illuminate\\Foundation\\Configuration\\Middleware;\n\nreturn Application::configure(basePath: dirname(__DIR__))\n    -&gt;withRouting(\n        web: __DIR__.'\/..\/routes\/web.php',\n        commands: __DIR__.'\/..\/routes\/console.php',\n        health: '\/up',\n    )\n    -&gt;withMiddleware(function (Middleware $middleware) {\n        \/\/\n    })\n    -&gt;withExceptions(function (Exceptions $exceptions) {\n        \/\/\n    })-&gt;create();\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">&lt;?<\/span><span style=\"color: #79B8FF\">php<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">use<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">Illuminate\\Foundation\\Application<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">use<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">Illuminate\\Foundation\\Configuration\\Exceptions<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">use<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">Illuminate\\Foundation\\Configuration\\Middleware<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">return<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">Application<\/span><span style=\"color: #F97583\">::<\/span><span style=\"color: #B392F0\">configure<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #B392F0\">basePath<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #79B8FF\">dirname<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #79B8FF\">__DIR__<\/span><span style=\"color: #E1E4E8\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">withRouting<\/span><span style=\"color: #E1E4E8\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">web<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #79B8FF\">__DIR__<\/span><span style=\"color: #F97583\">.<\/span><span style=\"color: #9ECBFF\">&#39;\/..\/routes\/web.php&#39;<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">commands<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #79B8FF\">__DIR__<\/span><span style=\"color: #F97583\">.<\/span><span style=\"color: #9ECBFF\">&#39;\/..\/routes\/console.php&#39;<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #B392F0\">health<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">&#39;\/up&#39;<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">withMiddleware<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #F97583\">function<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">Middleware<\/span><span style=\"color: #E1E4E8\"> $middleware) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #6A737D\">\/\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    })<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">withExceptions<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #F97583\">function<\/span><span style=\"color: #E1E4E8\"> (<\/span><span style=\"color: #79B8FF\">Exceptions<\/span><span style=\"color: #E1E4E8\"> $exceptions) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #6A737D\">\/\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    })<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">create<\/span><span style=\"color: #E1E4E8\">();<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The <code>config<\/code> directory has been slimmed down by removing some of the files that were previously included in Laravel 10 such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>config\/broadcasting.php<\/code><\/li>\n\n\n\n<li><code>config\/cors.php<\/code><\/li>\n\n\n\n<li><code>config\/hashing.php<\/code><\/li>\n\n\n\n<li><code>config\/sanctum.php<\/code><\/li>\n\n\n\n<li><code>config\/view.php<\/code><\/li>\n<\/ul>\n\n\n\n<p>The <code>routes<\/code> directory has also been cleaned up a bit by removing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>routes\/api.php<\/code><\/li>\n\n\n\n<li><code>routes\/channel.php<\/code><\/li>\n\n\n\n<li><code>routes\/console.php<\/code><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"eager-load\">Eager Load Limit<\/h2>\n\n\n\n<p>The introduction of the eager load limit feature allows developers to efficiently query related models without overloading the system with unnecessary data. This feature optimizes the data loading process, making it possible to limit the number of related records loaded, thus improving application performance. In previous versions of Laravel you needed to install a separate package for eager load limit. <\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"class User extends Model\n{\n    public function posts()\n    {\n        return $this-&gt;hasMany(Post::class);\n    }\n}\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">class<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">User<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">extends<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">Model<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">public<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">function<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">posts<\/span><span style=\"color: #E1E4E8\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #F97583\">return<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">$this<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">hasMany<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #79B8FF\">Post<\/span><span style=\"color: #F97583\">::class<\/span><span style=\"color: #E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"class Post extends Model\n{\n    \/\/ ...\n}\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">class<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">Post<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">extends<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">Model<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #6A737D\">\/\/ ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$users = User::with(['posts' =&gt; function ($query) {\n    $query-&gt;latest()-&gt;limit(10); \n}])-&gt;get();\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E1E4E8\">$users <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">User<\/span><span style=\"color: #F97583\">::<\/span><span style=\"color: #B392F0\">with<\/span><span style=\"color: #E1E4E8\">([<\/span><span style=\"color: #9ECBFF\">&#39;posts&#39;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">function<\/span><span style=\"color: #E1E4E8\"> ($query) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    $query<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">latest<\/span><span style=\"color: #E1E4E8\">()<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">limit<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #79B8FF\">10<\/span><span style=\"color: #E1E4E8\">); <\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}])<\/span><span style=\"color: #F97583\">-&gt;<\/span><span style=\"color: #B392F0\">get<\/span><span style=\"color: #E1E4E8\">();<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"model-cast\">Model Casts as Methods<\/h2>\n\n\n\n<p>Laravel 11 allows defining casts as methods within model classes, offering more flexibility in how data is cast when retrieved from or stored in the database. This method-based approach provides a clearer and more dynamic way to handle data casting, enhancing the overall code readability and maintainability.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"use App\\Enums\\UserOption;\nuse Illuminate\\Database\\Eloquent\\Casts\\AsEnumCollection;\n \n\/\/ ...\n \n\/**\n * Get the attributes that should be cast.\n *\n * @return array&lt;string, string&gt;\n *\/\nprotected function casts(): array\n{\n    return [\n        'email_verified_at' =&gt; 'datetime',\n        'password' =&gt; 'hashed',\n        'options' =&gt; AsEnumCollection::of(UserOption::class),\n    ];\n}\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">use<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">App\\Enums\\UserOption<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">use<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">Illuminate\\Database\\Eloquent\\Casts\\AsEnumCollection<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\">\/\/ ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\">\/**<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"> * Get the attributes that should be cast.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"> *<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"> * <\/span><span style=\"color: #F97583\">@return<\/span><span style=\"color: #6A737D\"> <\/span><span style=\"color: #F97583\">array<\/span><span style=\"color: #6A737D\">&lt;<\/span><span style=\"color: #F97583\">string<\/span><span style=\"color: #6A737D\">, string&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"> *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">protected<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">function<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">casts<\/span><span style=\"color: #E1E4E8\">()<\/span><span style=\"color: #F97583\">:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">array<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">return<\/span><span style=\"color: #E1E4E8\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #9ECBFF\">&#39;email_verified_at&#39;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">&#39;datetime&#39;<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #9ECBFF\">&#39;password&#39;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">&#39;hashed&#39;<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #9ECBFF\">&#39;options&#39;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">AsEnumCollection<\/span><span style=\"color: #F97583\">::<\/span><span style=\"color: #B392F0\">of<\/span><span style=\"color: #E1E4E8\">(<\/span><span style=\"color: #79B8FF\">UserOption<\/span><span style=\"color: #F97583\">::class<\/span><span style=\"color: #E1E4E8\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    ];<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>For comparison, in Laravel 10 this model cast would be defined using the <code>$cast<\/code> array property but you would not be able to call static methods.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"protected $casts = [\n    'options' =&gt; AsEnumCollection::class.':'.UserOption::class,\n];\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">protected<\/span><span style=\"color: #E1E4E8\"> $casts <\/span><span style=\"color: #F97583\">=<\/span><span style=\"color: #E1E4E8\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #9ECBFF\">&#39;options&#39;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">=&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">AsEnumCollection<\/span><span style=\"color: #F97583\">::class<\/span><span style=\"color: #F97583\">.<\/span><span style=\"color: #9ECBFF\">&#39;:&#39;<\/span><span style=\"color: #F97583\">.<\/span><span style=\"color: #79B8FF\">UserOption<\/span><span style=\"color: #F97583\">::class<\/span><span style=\"color: #E1E4E8\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">];<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"reverb\">Laravel Reverb: Real-Time Communication<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"433\" src=\"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-2-1024x433.png\" alt=\"\" class=\"wp-image-73842\" srcset=\"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-2-1024x433.png 1024w, https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-2-300x127.png 300w, https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-2-768x325.png 768w, https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-2.png 1251w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><a href=\"https:\/\/reverb.laravel.com\" target=\"_blank\" rel=\"noreferrer noopener\">Laravel Reverb<\/a> stands out as one of the most exciting additions in Laravel 11, offering a first-party WebSocket server that facilitates real-time communication between the client and server. Reverb is designed for high performance, capable of supporting thousands of connections simultaneously without the inefficiencies of HTTP polling. It integrates seamlessly with Laravel&#8217;s existing broadcasting capabilities and is built for scalability, with support for horizontal scaling using Redis. This makes it a robust solution for developers looking to incorporate real-time features into their applications, such as live chat, notifications, and dynamic content updates.<\/p>\n\n\n\n<p>Reverb is optimized for speed and integrates smoothly with Laravel Forge for deployment, offering built-in monitoring support with Pulse. Its use of the Pusher protocol ensures compatibility with Laravel broadcasting and Laravel Echo, making it easier to develop engaging and interactive web applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Practical Implementation and Scaling<\/h3>\n\n\n\n<p>Implementing Laravel Reverb involves installing the package, configuring it according to your project&#8217;s requirements, and integrating its optimizations to enhance your application. Testing and validating these integrations are crucial to ensuring that the real-time features perform as expected. Monitoring application performance post-deployment is also recommended to identify and address any potential bottlenecks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"commands\">New Artisan Commands<\/h2>\n\n\n\n<p>Laravel 11&#8217;s new Artisan commands are a boon for developer productivity, significantly reducing the boilerplate code required when adding new components to an application. With commands for generating classes, enums, interfaces, and traits, developers can now scaffold new parts of their application with minimal effort. These commands are designed to streamline the development process, allowing for quicker setup and structuring of application logic and data representations. By using these commands, developers can adhere to best practices in code organization and maintainability, ensuring that their codebase remains clean and well-structured.<\/p>\n\n\n\n<p>For example, the introduction of <code>php artisan make:enum<\/code> simplifies the creation of enums, which are useful for defining a set of named constants. Enums can make your code more readable and less error-prone by limiting the values a variable can have. Similarly, the <code>php artisan make:interface<\/code> and <code>php artisan make:trait<\/code> commands facilitate the adoption of SOLID principles by promoting the use of interfaces for defining contracts within an application and traits for sharing methods across classes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"health\">Health Route and APP_KEY Rotation<\/h2>\n\n\n\n<p>The <code>\/up<\/code> health route and the APP_KEY rotation feature are critical for maintaining the security and reliability of Laravel applications. The health route provides a simple way to verify that your application is running and responsive, making it invaluable for uptime monitoring and alerting systems. By integrating this route, developers can easily set up health checks that monitor the application&#8217;s status, quickly detecting and responding to any downtime.<\/p>\n\n\n\n<p>The APP_KEY rotation feature addresses a common security concern by allowing for the secure rotation of the application&#8217;s encryption key without risking data loss. In previous versions of Laravel, changing the <code>APP_KEY<\/code> could result in inaccessible data due to the encryption dependency on this key. Laravel 11 introduces a more flexible approach, allowing old data to be decrypted with previous keys specified in the <code>APP_PREVIOUS_KEYS<\/code> environment variable while encrypting new data with the current key. This feature is essential for maintaining high-security standards, as regularly rotating keys can protect against certain types of cryptographic attacks without the drawback of losing access to encrypted data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install\">Install Laravel 11<\/h2>\n\n\n\n<p>If you are looking to set up a new Laravel 11 installation, you would just follow the normal procedures for <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/laravel\/how-to-install-laravel\/\" target=\"_blank\" rel=\"noreferrer noopener\">installing Laravel manually<\/a> or <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/laravel\/install-laravel-softaculous\/\" target=\"_blank\" rel=\"noreferrer noopener\">via Softaculous<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"upgrade\">How to Upgrade to Laravel 11<\/h2>\n\n\n\n<p>There are two routes that you can take to upgrade to Laravel 11. You can manually upgrade by following <a href=\"https:\/\/laravel.com\/docs\/11.x\/upgrade\" target=\"_blank\" rel=\"noreferrer noopener\">Laravel&#8217;s Upgrade Guide<\/a> or pay for <a href=\"https:\/\/laravelshift.com\" target=\"_blank\" rel=\"noreferrer noopener\">Laravel Shift<\/a> to automate the upgrade process. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>Together, these enhancements in Laravel 11 underscore the framework&#8217;s commitment to facilitating efficient development practices while ensuring the security and resilience of applications. By incorporating these features, Laravel continues to offer a robust foundation for building and maintaining modern PHP applications, keeping pace with the evolving needs of developers and the industry at large.<\/p>\n\n\n<div class=\"jumbotron\">\r\n<p>Boost your Laravel apps with our specialized <a href=\"https:\/\/www.inmotionhosting.com\/laravel-hosting\">Laravel Hosting<\/a>. Experience faster speeds for your Laravel applications and websites thanks to NVMe storage, server protection, dedicated resources, and optimization tools.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>99.99% Uptime    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Free SSL    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Dedicated IP Address    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Developer Tools<\/p>\r\n<p><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/www.inmotionhosting.com\/laravel-hosting\">Laravel Hosting<\/a><\/p>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Laravel 11, launched on March 12, 2024, marks a significant update to the Laravel framework, introducing a range of new features and improvements aimed at enhancing the development experience and application performance. With a focus on efficiency, security, and real-time web application development, Laravel 11 brings forward several key enhancements and introduces Laravel Reverb, a<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/\"> Read More ><\/a><\/p>\n","protected":false},"author":109,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[521],"tags":[],"class_list":["post-73830","post","type-post","status-publish","format-standard","hentry","category-laravel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Laravel 11 is now available! | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Explore the new features and updates in Laravel 11, including streamlined commands, real-time Laravel Reverb, and enhanced security measures in our latest blog post.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Laravel 11 is now available! | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Explore the new features and updates in Laravel 11, including streamlined commands, real-time Laravel Reverb, and enhanced security measures in our latest blog post.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-19T11:11:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-19T11:11:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1-1024x636.png\" \/>\n<meta name=\"author\" content=\"Derrell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@inmotionhosting\" \/>\n<meta name=\"twitter:site\" content=\"@inmotionhosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Derrell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Laravel 11 is now available! | InMotion Hosting","description":"Explore the new features and updates in Laravel 11, including streamlined commands, real-time Laravel Reverb, and enhanced security measures in our latest blog post.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/","og_locale":"en_US","og_type":"article","og_title":"Laravel 11 is now available! | InMotion Hosting","og_description":"Explore the new features and updates in Laravel 11, including streamlined commands, real-time Laravel Reverb, and enhanced security measures in our latest blog post.","og_url":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/","og_site_name":"InMotion Hosting Blog","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting","article_published_time":"2024-03-19T11:11:33+00:00","article_modified_time":"2024-03-19T11:11:35+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1-1024x636.png","type":"","width":"","height":""}],"author":"Derrell","twitter_card":"summary_large_image","twitter_creator":"@inmotionhosting","twitter_site":"@inmotionhosting","twitter_misc":{"Written by":"Derrell","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/"},"author":{"name":"Derrell","@id":"https:\/\/www.inmotionhosting.com\/blog\/#\/schema\/person\/5124acb86d7edd60e8a3c502ecab6e6b"},"headline":"Laravel 11 is now available!","datePublished":"2024-03-19T11:11:33+00:00","dateModified":"2024-03-19T11:11:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/"},"wordCount":1227,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1-1024x636.png","articleSection":["Laravel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/","url":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/","name":"Laravel 11 is now available! | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1-1024x636.png","datePublished":"2024-03-19T11:11:33+00:00","dateModified":"2024-03-19T11:11:35+00:00","description":"Explore the new features and updates in Laravel 11, including streamlined commands, real-time Laravel Reverb, and enhanced security measures in our latest blog post.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1.png","contentUrl":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2024\/03\/image-1.png","width":1510,"height":938},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/blog\/laravel-11-is-now-available\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Laravel","item":"https:\/\/www.inmotionhosting.com\/blog\/laravel\/"},{"@type":"ListItem","position":3,"name":"Laravel 11 is now available!"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/blog\/#website","url":"https:\/\/www.inmotionhosting.com\/blog\/","name":"InMotion Hosting Blog","description":"Web Hosting Strategy, Trends and Security","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/blog\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2019\/11\/imh-logo-all-colors-big.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/blog\/wp-content\/uploads\/2019\/11\/imh-logo-all-colors-big.jpg","width":1630,"height":430,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting","https:\/\/x.com\/inmotionhosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/blog\/#\/schema\/person\/5124acb86d7edd60e8a3c502ecab6e6b","name":"Derrell","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0f3cb5810f545fb23da70ace1b099415f93c033b339e1c3ab3b29a6e60cf7759?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0f3cb5810f545fb23da70ace1b099415f93c033b339e1c3ab3b29a6e60cf7759?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0f3cb5810f545fb23da70ace1b099415f93c033b339e1c3ab3b29a6e60cf7759?s=96&r=g","caption":"Derrell"},"url":"https:\/\/www.inmotionhosting.com\/blog\/author\/derrellw\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":521,"name":"Laravel","slug":"laravel","link":"https:\/\/www.inmotionhosting.com\/blog\/laravel\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/posts\/73830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/users\/109"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=73830"}],"version-history":[{"count":6,"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/posts\/73830\/revisions"}],"predecessor-version":[{"id":73844,"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/posts\/73830\/revisions\/73844"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=73830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=73830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=73830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}