Laravel v5.4.29 is Released with Two New Blade Directives

Published on by

Laravel v5.4.29 is Released with Two New Blade Directives image

Laravel V5.4.29 is now released and available. This is a maintenance release but it includes two new Blade Directives, a --force option on some of the “make” commands, and more.

New @auth and @guest Directives

The @auth directive allows you to simplify the check to see if a user is logged in. For example, in the past you might use:

@if(Auth::check())
You are logged in.
@endif

Now with the @auth directive, this can be simplified to:

@auth
You are logged in.
@endauth

It also supports the Guard to use as the first parameter:

@auth('admin')
You are logged in through admin guard
@endauth

The other new directive is @guest which is the inverse:

@guest
Welcome Guest
@endauth

v5.4.29 Complete Changelog

Added

  • Added ManagesFrequencies::twiceMonthly() method (#19874)
  • Added RouteCollection::getRoutesByName() method (#19901)
  • Added $expiresAt parameter to CallbackEvent::withoutOverlapping() (#19861)
  • Support keeping old files when testing uploads (#19859)
  • Added --force option to make:mail, make:model and make:notification (#19932)
  • Added support for PostgreSQL deletes with USES clauses (#20062, f94fc02)
  • Added support for CC and BBC on mail notifications (#20093)
  • Added Blade @auth and @guest directive (#20087, #20114)
  • Added option to configure MARS on SqlServer connections (#20113, c2c917c)

Changed

  • Support object items in Arr::pluck() (#19838, #19845)
  • MessageBag interface now extends Arrayable (#19849)
  • Made Blueprint macroable (#19862)
  • Improved performance for Arr::crossJoin() (#19864)
  • Use the correct User model namespace for new policies (#19965, a7094c2)
  • Consider scheduled event timezone in inTimeInterval() (#19959)
  • Render exception if handler can’t report it (#19977)
  • Made MakesHttpRequests::withServerVariables() public (#20086)
  • Invalidate session instead of regenerating it when logging out (#20107)
  • Improved InvalidPayloadException error message (#20143)

Fixed

  • Don’t re-escape a View instance passed as the default value to @yield or @section directives (#19884)
  • Make sure migration file is loaded before trying to rollback (#19922)
  • Fixed caching issue in mix() (#19968)
  • Signal alarm after timeout passes (#19978)
Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Forge
Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. We ♥ Laravel

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
All Green logo

All Green

All Green is a SaaS test runner that can execute your whole Laravel test suite in mere seconds so that you don't get blocked – you get feedback almost instantly and you can deploy to production very quickly.

All Green
Larafast: Laravel SaaS Starter Kit logo

Larafast: Laravel SaaS Starter Kit

Larafast is a Laravel SaaS Starter Kit with ready-to-go features for Payments, Auth, Admin, Blog, SEO, and beautiful themes. Available with VILT and TALL stacks.

Larafast: Laravel SaaS Starter Kit
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector

The latest

View all →
Asserting Exceptions in Laravel Tests image

Asserting Exceptions in Laravel Tests

Read article
Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4 image

Reversible Form Prompts and a New Exceptions Facade in Laravel 11.4

Read article
Basset is an alternative way to load CSS & JS assets image

Basset is an alternative way to load CSS & JS assets

Read article
Integrate Laravel with Stripe Connect Using This Package image

Integrate Laravel with Stripe Connect Using This Package

Read article
The Random package generates cryptographically secure random values image

The Random package generates cryptographically secure random values

Read article
Automatic Blade Formatting on Save in PhpStorm image

Automatic Blade Formatting on Save in PhpStorm

Read article