php



Domain Driven Design with Laravel 9

  • avatar
Preview post image

Modern web frameworks teach you to take one group of related concepts and split it across multiple places throughout your codebase. Laravel is a robust framework with a big community behind it. Usually it's standard structure is enough for most starting projects.

Building scalable applications, instead, requires a different approach. Have you ever heard from a client to work on controllers or review the models folder? Probably never - they ask you to work on invoicing, clients management or users. These concept groups are called domains.

How to install or upgrade to Composer v2

  • avatar
  • 24.3K Views
  • 14 Likes
  • 4 mins read
Preview post image

Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. It manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project.

Interfaces binding with implementations in Laravel

  • avatar
  • 12.3K Views
  • 15 Likes
  • 9 mins read
Preview post image

An interface is a programming structure that allows the computer to enforce certain properties on an object. In object oriented programming, an interface generally defines the set of methods that an instance of a class that has that interface could respond to. It is actually a concept of abstraction and encapsulation.

 Join Our Monthly Newsletter

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

We never send SPAM nor unsolicited emails

Nginx with PHP8.1 FPM on Ubuntu 20.04

  • avatar
  • 9.8K Views
  • 15 Likes
  • 6 mins read
Preview post image

PHP is a general-purpose scripting language geared towards web development. PHP code is usually processed on a web server by a PHP interpreter implemented as a module, a daemon or as a Common Gateway Interface (CGI) executable.

By default Nginx is not capable of processing dynamic web pages with PHP so it requires the use of specific additional plugins for this purpose. One of these plugins is FPM (FastCGI Process Manager). FPM is an alternative PHP FastCGI implementation with some additional features (mostly) useful for heavy-loaded sites. It is the preferred method of processing PHP pages with Nginx and is faster than traditional CGI based methods.

Running PHP8.2 with Nginx on Ubuntu

  • avatar
  • 9.1K Views
  • 6 mins read
Preview post image

PHP is a general-purpose scripting language geared towards web development. PHP code is usually processed on a web server by a PHP interpreter implemented as a module, a daemon or as a Common Gateway Interface (CGI) executable.

By default Nginx is not capable of processing dynamic web pages with PHP so it requires the use of specific additional plugins for this purpose. One of these plugins is FPM (FastCGI Process Manager). FPM is an alternative PHP FastCGI implementation with some additional features (mostly) useful for heavy-loaded sites. It is the preferred method of processing PHP pages with Nginx and is faster than traditional CGI based methods.

Install PHPStan and configure for Laravel application

  • avatar
  • 9.2K Views
  • 11 Likes
  • 3 mins read
Preview post image

Unlike compiled languages, in PHP if you make a mistake, the program will crash when the line of code with the mistake is executed. When testing a PHP application, whether manually or automatically, developers spend a lot of their time discovering mistakes that wouldn’t even compile in other languages, leaving less time for testing actual business logic.

Containerizing Laravel Application using Docker

  • avatar
Preview post image

In the world of modern web development, containerization has emerged as a popular approach for packaging applications, providing isolated environments, and simplifying deployment processes. Docker, an open-source platform, has gained significant traction in this regard, allowing developers to encapsulate their applications and dependencies into containers. In this article, we will explore the benefits and steps involved in Docker containerization of Laravel applications, a popular PHP framework.

Domain Driven Design with Laravel 9: User domain

  • avatar
  • 6.4K Views
  • 15 Likes
  • 11 mins read
Preview post image

Modern web frameworks take one group of related concepts and split it across multiple places throughout your codebase. Laravel provides a very clear structure with large variety of tools to make the development easier and faster. Along with the huge community it makes Laravel a great option for most starting projects.

Social authentication with Laravel Socialite

  • avatar
  • 5.1K Views
  • 6 Likes
  • 7 mins read
Preview post image

Social login is now an essential part of any site which performs user authentication. It does not need to replace the standard form based authentication, quite the contrary, social login complements it. Login with social accounts is a straightforward process and it saves the users a lot of time, as they won't need to fill the whole form. They just sign up with their social account and they can log into the website with just a few clicks.

Universally unique identifiers: UUID vs ULID

  • avatar
  • 4.8K Views
  • 2 Likes
  • 7 mins read
Preview post image

Historically a lot of software has used incrementing numbers to represent the identifier of a particular piece of data. They can be auto-generated by many data stores, they are easy to read, efficient to store and naturally time ordered.

As time passes, applications become larger. They need more resources and usually distributed in different places. That may cause some errors generating concurrent numbers and coordination issues. Incremental numbers can also be the source of security problems and they may include implicit information about datasets volume. Modern software architectures also trend to decouple infrastructure layer and move ID generation logic to the domain core.