Is it still relevant to use Repository Pattern in a laravel application?” [closed]Generic Repository or Specific Repository for each entity?What's an Aggregate Root?Proper Repository Pattern Design in PHP?Managing relationships in Laravel, adhering to the repository patternHow to Create Multiple Where Clause Query Using Laravel Eloquent?Repository pattern implementation with LaravelLaravel 5 Failed opening required bootstrap/../vendor/autoload.phpDo i have to use repository pattern in laravel?Removing Repository Pattern from infyom laravel generatorLaravel repository pattern firstOrCreate (wasRecentlyCreated)Are Repositories an old pattern in today's Laravel?

How did old MS-DOS games utilize various graphic cards?

English word for "product of tinkering"

Soft question: Examples where lack of mathematical rigour cause security breaches?

Someone whose aspirations exceed abilities or means

Overlapping String-Blocks

Is using haveibeenpwned to validate password strength rational?

Pre-1972 sci-fi short story or novel: alien(?) tunnel where people try new moves and get destroyed if they're not the correct ones

Implement Own Vector Class in C++

1980s live-action movie where individually-coloured nations on clouds fight

Do simulator games use a realistic trajectory to get into orbit?

Check if three arrays contains the same element

Generate basis elements of the Steenrod algebra

Is it expected that a reader will skip parts of what you write?

Is a lack of character descriptions a problem?

Should I give professor gift at the beginning of my PhD?

How do governments keep track of their issued currency?

How can I tell the difference between unmarked sugar and stevia?

Does the Long March-11 increase its thrust after clearing the launch tower?

Certain search in list

Union with anonymous struct with flexible array member

Why can't I use =default for default ctors with a member initializer list

Medieval flying castle propulsion

Winning Strategy for the Magician and his Apprentice

Importance of Building Credit Score?



Is it still relevant to use Repository Pattern in a laravel application?” [closed]


Generic Repository or Specific Repository for each entity?What's an Aggregate Root?Proper Repository Pattern Design in PHP?Managing relationships in Laravel, adhering to the repository patternHow to Create Multiple Where Clause Query Using Laravel Eloquent?Repository pattern implementation with LaravelLaravel 5 Failed opening required bootstrap/../vendor/autoload.phpDo i have to use repository pattern in laravel?Removing Repository Pattern from infyom laravel generatorLaravel repository pattern firstOrCreate (wasRecentlyCreated)Are Repositories an old pattern in today's Laravel?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-2















I'm setting up a new laravel project, and want to reduce code in my controllers. Do I need to use repository pattern?”










share|improve this question













closed as primarily opinion-based by Amit Joshi, gnat, Alexander Kogtenkov, greg-449, thewaywewere Mar 25 at 8:09


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.













  • 1





    Respository pattern is not for reducing code in controllers.

    – Harven
    Mar 24 at 18:25











  • You never "need" to use the repository pattern. Can you give an example of the code you want to try an reduce?

    – Ross Wilson
    Mar 24 at 19:05











  • May be helpful: stackoverflow.com/a/51781877/5779732

    – Amit Joshi
    Mar 25 at 6:09

















-2















I'm setting up a new laravel project, and want to reduce code in my controllers. Do I need to use repository pattern?”










share|improve this question













closed as primarily opinion-based by Amit Joshi, gnat, Alexander Kogtenkov, greg-449, thewaywewere Mar 25 at 8:09


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.













  • 1





    Respository pattern is not for reducing code in controllers.

    – Harven
    Mar 24 at 18:25











  • You never "need" to use the repository pattern. Can you give an example of the code you want to try an reduce?

    – Ross Wilson
    Mar 24 at 19:05











  • May be helpful: stackoverflow.com/a/51781877/5779732

    – Amit Joshi
    Mar 25 at 6:09













-2












-2








-2








I'm setting up a new laravel project, and want to reduce code in my controllers. Do I need to use repository pattern?”










share|improve this question














I'm setting up a new laravel project, and want to reduce code in my controllers. Do I need to use repository pattern?”







laravel laravel-5 eloquent repository-pattern






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 18:13









Alpha OlomiAlpha Olomi

32




32




closed as primarily opinion-based by Amit Joshi, gnat, Alexander Kogtenkov, greg-449, thewaywewere Mar 25 at 8:09


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as primarily opinion-based by Amit Joshi, gnat, Alexander Kogtenkov, greg-449, thewaywewere Mar 25 at 8:09


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.









  • 1





    Respository pattern is not for reducing code in controllers.

    – Harven
    Mar 24 at 18:25











  • You never "need" to use the repository pattern. Can you give an example of the code you want to try an reduce?

    – Ross Wilson
    Mar 24 at 19:05











  • May be helpful: stackoverflow.com/a/51781877/5779732

    – Amit Joshi
    Mar 25 at 6:09












  • 1





    Respository pattern is not for reducing code in controllers.

    – Harven
    Mar 24 at 18:25











  • You never "need" to use the repository pattern. Can you give an example of the code you want to try an reduce?

    – Ross Wilson
    Mar 24 at 19:05











  • May be helpful: stackoverflow.com/a/51781877/5779732

    – Amit Joshi
    Mar 25 at 6:09







1




1





Respository pattern is not for reducing code in controllers.

– Harven
Mar 24 at 18:25





Respository pattern is not for reducing code in controllers.

– Harven
Mar 24 at 18:25













You never "need" to use the repository pattern. Can you give an example of the code you want to try an reduce?

– Ross Wilson
Mar 24 at 19:05





You never "need" to use the repository pattern. Can you give an example of the code you want to try an reduce?

– Ross Wilson
Mar 24 at 19:05













May be helpful: stackoverflow.com/a/51781877/5779732

– Amit Joshi
Mar 25 at 6:09





May be helpful: stackoverflow.com/a/51781877/5779732

– Amit Joshi
Mar 25 at 6:09












1 Answer
1






active

oldest

votes


















1















Do I need to use repository pattern?




Trying to organise your code doesn't directly mean that you "have to" and "need to" use the repository pattern. You can safely use helper classes to extract some of the logic from the controllers. Moreover, Laravel structures its code quite well. You can help it by implementing gateways or using observers where possible. Using events is a possibility too. However, you should be aware of how these things work before implementing them since you might introduce errors with the testing later on.






share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1















    Do I need to use repository pattern?




    Trying to organise your code doesn't directly mean that you "have to" and "need to" use the repository pattern. You can safely use helper classes to extract some of the logic from the controllers. Moreover, Laravel structures its code quite well. You can help it by implementing gateways or using observers where possible. Using events is a possibility too. However, you should be aware of how these things work before implementing them since you might introduce errors with the testing later on.






    share|improve this answer



























      1















      Do I need to use repository pattern?




      Trying to organise your code doesn't directly mean that you "have to" and "need to" use the repository pattern. You can safely use helper classes to extract some of the logic from the controllers. Moreover, Laravel structures its code quite well. You can help it by implementing gateways or using observers where possible. Using events is a possibility too. However, you should be aware of how these things work before implementing them since you might introduce errors with the testing later on.






      share|improve this answer

























        1












        1








        1








        Do I need to use repository pattern?




        Trying to organise your code doesn't directly mean that you "have to" and "need to" use the repository pattern. You can safely use helper classes to extract some of the logic from the controllers. Moreover, Laravel structures its code quite well. You can help it by implementing gateways or using observers where possible. Using events is a possibility too. However, you should be aware of how these things work before implementing them since you might introduce errors with the testing later on.






        share|improve this answer














        Do I need to use repository pattern?




        Trying to organise your code doesn't directly mean that you "have to" and "need to" use the repository pattern. You can safely use helper classes to extract some of the logic from the controllers. Moreover, Laravel structures its code quite well. You can help it by implementing gateways or using observers where possible. Using events is a possibility too. However, you should be aware of how these things work before implementing them since you might introduce errors with the testing later on.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 24 at 19:29









        NikolayNikolay

        1423




        1423













            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript