The Technical Debt of Laravel and how you should avoid them

Image for post
Image for post
Debt will tear us apart (@rruthology)

1. Avoid hardcoding at all costs

class Post extends Model {    const STATUS_PUBLISHED = 1;
const STATUS_DRAFT = 2;
const STATUS_REJECTED = 3;
}

2. Mastering Eloquent, avoid DB::table() and DB::raw()

3. Don’t double the work, use Traits and Helpers

"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
},
"files": [
"app/Helper.php"
]
},

4. Smaller footprint classes and methods.

5. Don’t be afraid to refactor.

Full Stack Web Dev // Certified AWS SA // I run a Web Dev Agency (nedex.io). Twitter @elsodev.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store