Malas Coding dengan Laravel Framework

PHPID-OL @2021


Who am i?

IT Enthusiast, Cloud and Mobile Security Enthusiast, Public speaker

A Simple Person Who Loves Code, Share Knowledge and Always Learning all about IT and security.

Project Structure

  • Controllers - Handling the incoming requests and sending back responses
  • Services - Business logic
  • Repositories - responsible for interacting with databases or endpoint
  • Models - interact with that table

Design Patterns?

Design Patterns are reusable solutions to commonly occuring problems(in the context of software design). Design patterns were started as best practices that were applied again and again to similar problems encountered in different contexts

source :


Repository Patterns?


trait Message {
public function print() {
    echo "OOP is fun! ";
class Welcome {

   use Message;
$obj = new Welcome();


Plain Old {Insert Language Here} Object is an simple approach that says you don't always need to use an extensive class to store data or perform logic.

class HelloWorld{
    private $value;
    public function getValue(): ?string
        return $this->value;
    public function setValue(string $value) {
        $this->value = $value;

Best Practice POPO

class HelloWorld{

      * @var string


      public $value;


      * @var string


      public $name;


Dependency Injection?

Dependency Injection

TDD(Test Driven Development)

TDD(Test Driven Development)

Php Packages


Laravel Component

<x-component />

Lazy Tools

Lazy Project

Alpha Release Soon.



Malas Coding Dengan Menggunakan Laravel Framework

By Dyan Galih Nugroho Wicaksi

Malas Coding Dengan Menggunakan Laravel Framework

  • 333