Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed more readable #168

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Translations:

[اردو](urdu.md) (by [RizwanAshraf1](https://github.com/RizwanAshraf1))




[![Laravel example app](/images/laravel-real-world-banner.png?raw=true)](https://github.com/alexeymezenin/laravel-realworld-example-app)

## Contents
Expand Down Expand Up @@ -219,7 +222,7 @@ class PostRequest extends Request

### **Business logic should be in service class**

A controller must have only one responsibility, so move business logic from controllers to service classes.
A controller must have only one responsibility, so move business logic from controllers to service classes or using repository and interface.

Bad:

Expand Down Expand Up @@ -259,7 +262,7 @@ class ArticleService

### **Don't repeat yourself (DRY)**

Reuse code when you can. SRP is helping you to avoid duplication. Also, reuse Blade templates, use Eloquent scopes etc.
Whenever you can, reuse code. The single responsibility principle helps prevent duplication. Also, consider reusing Blade templates and using Eloquent scopes,etc ..

Bad:

Expand Down