Create Laravel 13 project from scratch

  • avatar
  • 255 Views
  • 7 mins read
Preview image

Laravel is a PHP framework built around the Model View Controller pattern, designed to make web development more organized and less repetitive. It has become one of the most widely used frameworks in the PHP ecosystem, and its yearly major releases keep bringing refinements to routing, database handling, testing, and application structure. Laravel 13 continues that pattern with a required PHP version bump, additional PHP attributes for controllers and queues, and a first party AI SDK, while leaving most day to day development patterns unchanged. Creating a new Laravel 13 project begins with installing PHP, Composer, and Laravel itself, followed by a short round of configuration that prepares the application for development.

How to create a Composer package from scratch

Available to Premium members only
  • avatar
  • 545 Views
  • 1 Like
  • 16 mins read
Preview image

A helper class, a small client wrapper or a set of validation rules often starts in one project and ends up copied into the next one. From that point the copies drift apart, a bug fixed in one of them stays open in the rest, and there is no version number to refer to when something changes.

Turning that code into a Composer package removes the copies. The requirements are modest, since a package is a directory containing a valid composer.json file, a Git repository hosting it, and a listing on Packagist that tells Composer where to find it.

Handling file uploads in Laravel 13

  • avatar
  • 4.7K Views
  • 9 mins read
Preview image

Handling file uploads is one of those things that sounds simple at first but has plenty of moving parts: storage drivers, validation, security, public access, multiple files. Laravel 13 ships with a solid, well-rounded set of tools to deal with all of this without pulling in third-party packages. This article walks through the full lifecycle of a file upload in a Laravel 13 application, from the HTML form to retrieving files from storage, with practical examples along the way.

 Join Our Monthly Newsletter

Get the latest news and popular articles to your inbox every month

We never send SPAM nor unsolicited emails

Keep your codebase clean with Git hooks

  • avatar
  • 842 Views
  • 9 mins read
Preview image

Every developer has been there: you push a commit, CI fails, and it turns out there was a linting error, a forgotten debug statement, or a test that nobody ran. Pre-commit hooks are the safety net that catches these problems before they ever leave your machine. They are not a complex feature or an advanced Git topic. They are just scripts, and once you understand how they work, you will find yourself reaching for them on every project.

Custom authentication in Laravel

  • avatar
  • 1.7K Views
  • 10 mins read
Preview image

Laravel ships with a solid authentication system out of the box, and most projects are well served by it. But there are situations where you need to authenticate users against something completely different: a legacy database, an external API, an LDAP server, or some other custom data source. Laravel's authentication system is built around a set of contracts and driver hooks that make this surprisingly straightforward to implement.

Implementing Commands and Queries in Laravel 12

  • avatar
  • 5.1K Views
  • 5 Likes
  • 8 mins read
Preview image

CQRS, short for Command Query Responsibility Segregation, is a simple yet powerful way to split the responsibility for writing and reading data in an application. Instead of having a single service or model method that both changes and retrieves data, you give commands the job of making changes and queries the job of fetching information. This split can make large projects much easier to follow, especially as business rules grow and read and write requirements start to differ.

Understanding Hexagonal Architecture with practical example

Available to registered members only
  • avatar
  • 2.8K Views
  • 1 Like
  • 7 mins read
Preview image

Hexagonal architecture, also called ports and adapters, is a software design approach that helps structure an application by clearly separating the core logic from technical details and external systems. Instead of shaping your app around frameworks, protocols, or storage, you keep your focus on what the application does, and let everything else connect to it through interfaces. The pattern isn't tied to any specific language. The examples in this article are written in PHP to show how the idea can be applied, but the approach works the same way in any backend system.

Tag-based cache inside Laravel repositories

Available to Premium members only
  • avatar
  • 2.8K Views
  • 12 mins read
Preview image

Working with cache can drastically improve the performance of an application, especially when dealing with data that doesn't change too often. While Laravel provides solid support for caching through multiple drivers, it doesn't offer native support for cache tags. To work around this limitation, we'll integrate Symfony's Cache component, which brings tag support and fits well into the repository pattern we've already established. In this article, we'll build on the existing structure and focus on using cache tags to group and clear related data more efficiently.

Understanding HMAC signatures and how they work

Available to registered members only
  • avatar
  • 4.7K Views
  • 1 Like
  • 4 mins read
Preview image

HMAC, short for Hash-based Message Authentication Code, is a method used to check that a message is both authentic and unmodified. It's a common tool in webhooks, APIs, and any place where secure communication between systems matters. The idea behind HMAC is to use a shared secret key along with a hashing algorithm to create a unique signature for a message. This signature acts like a stamp of trust, if anything changes in the message or if the wrong key is used, the signature won't match.

Getting started with CQRS in PHP

  • avatar
  • 1.9K Views
  • 5 mins read
Preview image

CQRS stands for Command Query Responsibility Segregation. It's a pattern that separates how an application reads data from how it writes data. This approach can help structure code more clearly, especially in systems that deal with complex business logic or need to scale certain operations differently.