Code Monkey home page Code Monkey logo

Comments (4)

PovilasKorop avatar PovilasKorop commented on August 16, 2024 2

@amitleuva1987 I've been researching this subject a while ago and realized that there's no such thing as "design patterns in Laravel", it's mostly about structuring your PHP classes in a good old OOP way according to design patterns.

So if you want to strictly follow design patterns, you typically zoom out your thinking and stop thinking about your project as a Laravel project, but rather a PHP project.

So I decided to switch the topic to SOLID Code, including some design patterns, and released it as a course here: https://laraveldaily.teachable.com/p/solid-code-in-laravel

from laravel-roadmap-learning-path.

amitleuva1987 avatar amitleuva1987 commented on August 16, 2024 1

@PovilasKorop , your answer is very helpful.

for those who are searching for the same stuff "how to implement design patterns in Laravel?". Below "urls" may help.

Reference URL
Reference URL

from laravel-roadmap-learning-path.

amitleuva1987 avatar amitleuva1987 commented on August 16, 2024

@PovilasKorop , Thank you very much for the explanation. I would also switch to the SOLID principles.

I also did not find anything regarding design patterns in Laravel. I mean there is no way to create an interface like we create models using the command 'php artisan make:model modelname'. If I need a new factory design, I have to create classes manually. There is no one command to fulfill this.

from laravel-roadmap-learning-path.

PovilasKorop avatar PovilasKorop commented on August 16, 2024

@amitleuva1987 yes, exactly, if you need an interface, you're creating not a Laravel thing, you're creating a PHP file.
If you need a factory design, it's a PHP thing, not Laravel.

Please close the issue if I answered "successfully" :)

from laravel-roadmap-learning-path.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.