RaúlLG
  • Inicio
  • Sobre mí
  • Formación
  • Ship 🚀
Sign in Subscribe

readability

A collection of 1 post
abort_if y abort_unless en Laravel
laravel

abort_if y abort_unless en Laravel

Estos son dos de mis helpers favoritos, ya que añaden mucha legibilidad a nuestro código y son muy simples de usar. Por ejemplo, supongamos el siguiente pedazo de código: public function handle(): void { if (! Auth::user()->isAdmin()) { throw new \Exception('Not allowed'); } // ... } Entendible, ¿no? Sin embargo,
13 feb. 2024 1 min read
Page 1 of 1
RaúlLG © 2025
  • Remote Laravel Developers
  • MVP Agency
Powered by Ghost