Posts tagged laravel

Real-World CoreUI Migration - From Laravel 8 to Laravel 11

Published At: Updated At: 2026-03-07

Introduction

At the beginning, there was a simple requirement - to upgrade a small web blog from Laravel 8 to Laravel 11. In general, problems with upgrading Laravel versions are well known, but solutions for two areas:

  • using the Tinymce editor for the admin dashboard
  • CSS solution for the frontend application with Vite 5 and CoreUI 5 proved to be challenging. It is the second area, using the new versions of CoreUI and Vite, that we will discuss in the following...

Read More

Laravel Best Practices

Published At: Updated At: 2025-07-24

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() && auth()->user()->hasRole('client') && auth()->user()->isVerified()) {
        return 'Mr. ' . $this->first_name . ' ' . $this->middle_name . ' ' . $this->last_name;
    } else {
        return $this->first_name[0] . '. '...

Read More