Laravel project standards

\ for php function


No \Exception

Should use customized exception class like


class DriverException extends \Exception


This is because we can use Handler to filter different exceptions.

The Repository Design Pattern

The Customize Request in controller

No Illuminate\Http\Request instance goes to any controller. Controller must use customize request class instance.

Test pattern

Unit test (PoT)

Process-oriented test For all task, unit test clearly show how function/program working.

Accessibility test (RoT)

Result-oriented test For controller, Accessibility test doesn’t know or care how function/program working.

Decorating Laravel Repositories

Class files group by

group by type, then, group by project.