Posts

Incremental update of code on hosted server

Published At:

Often during the development of a Laravel application, there are cases where it is necessary to implement the debugged code on a live server. It takes a long time to transfer all the code (including packages and modules) even at a high transfer rate....

Laravel - how to deploy code changes on hosted server

Published At:

It is recommended to do an initial installation on hosted server without all dev packages and tools. The best approach is to prepare a local docker installation where it is possible to run composer and NPM. For this purpose, we can use an intermediate...

Laravel Best Practices

Published At: Updated At: 2023-06-22

Note created on: 2023-05-05 07:45

Single responsibility principle

A class and a method should have only one responsibility.

Bad:

public function getFullNameAttribute(): string
{
    if (auth()->user()...