Implementing Dependency Inversion Principle (DIP) using Laravel

In my previous SOLID principle blogs, we already have discussed the four principles and this one will discuss the last of the SOLID principles which is Dependency Inversion Principle (DIP) The dependency Inversion Principle says that High-level modules should not depend on low-level modules. Both should depend on abstractions (e.g., interfaces). If you look at …

Implementing Dependency Inversion Principle (DIP) using Laravel Read More »

Implementing Interface Segregation Principle (ISP) Using Laravel

The interface segregation principle states: A client should never be forced to implement an interface that it doesn’t use, or clients shouldn’t be forced to depend on methods they do not use. This essentially means that instead of a big interface with lot many methods… we should have smaller interfaces with specific methods that will …

Implementing Interface Segregation Principle (ISP) Using Laravel Read More »

Implementing Liskov Substitution Principle (LSP) using Laravel

Already I wrote a blog on SRP and OCP in solid principles. I am continuing further with the same example… and in this blog, we will be discussing the Liskov Substitution Principle (LSP). Definition: Objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program. LSP ensures …

Implementing Liskov Substitution Principle (LSP) using Laravel Read More »

Implementing Open/Closed Principle (OCP) in Laravel

We already discussed SRP in our previous blog. Let’s discuss Open/Closed Principle (OCP) in this blog. OCP is defined as “Software entities (classes, modules, functions) should be open for extension but closed for modification.”. This means one should be able to add new functionality to existing code without altering it. For example, we can try …

Implementing Open/Closed Principle (OCP) in Laravel Read More »

Implementing Single Responsibility Principle in Laravel

Single responsibility Principle (SRP) is first of five Solid principles. It is defined as “A class should have only one reason to change.” Single Controller Handling All Operations Above is the example of one class doing everything… and logic is inside every method. This breaks the SRP. To start with this looks faster and easy …

Implementing Single Responsibility Principle in Laravel Read More »

Observer in Laravel

Observer in Laravel is used to do any operations that may be needed before or after any CUD operations on a model. Like before Creating a record, After record is created in the model. Similarly before updating a record and after record is updated etc..   How to create observer? > php artisan make:observer ProductObserver –model=Product …

Observer in Laravel Read More »

Correlation in Machine Learning | Correlation Coefficient

Hello Friends, Today we’ll discuss correlation coefficient and few important methods to calculate correlation coefficient. Before diving deep in correlation coefficient, let’s understand correlation. One can casually understand from the word, that it’s Co-Relation, which is exactly the purpose of correlation coefficient. Correlation means the relation between 2 or more variables. Now, here comes correlation …

Correlation in Machine Learning | Correlation Coefficient Read More »

New Announcement | C++ Tutorial Course

Hi all, we are really glad to announce that we’re back after the long break due to COVID19. Now, we’ll be going to resume our operations soon. So, without wasting the time, let’s move to the main motive of writing this article. We’re going to launch a C++ tutorial course. We’ll cover from basics to …

New Announcement | C++ Tutorial Course Read More »

Share via
Copy link
Powered by Social Snap