Laravel Laravel
  • Prologue

    • Release Notes
  • Getting Started

    • Installation
    • Configuration
    • Docker
    • Update
    • Upgrade from v3
  • Advanced Topics

    • Settings
    • Keyboard Shortcuts
    • Advanced Setups
    • Honeypot and Teapots
    • External tracking with Matomo,
      Google Analytics & Co
  • Frequently Asked Question

    • General
    • Installation, migration, upgrade, update
    • Troubleshooting
  • Contributing

    • Contribution Guide
    • API Documentation
    • Lychee logic overview
    • Directory Structure
    • Front-end
  • Laravel

Lychee logic overview

  • Brief introduction to Laravel
  • Interesting readings

Brief introduction to Laravel

Laravel is a MVC (Model-View-Controller) framework for PHP. Its process is as follows.

  1. A Request is made, it goes through the routes.
  2. The route decide which controller is being applied.
    We apply a middleware if requested (User Access verification mainly).
  3. The controller makes calls to models which is hides the calls to the database through clever queries.
  4. After applying logic, we return a view (template) or a JSON response.

The following figure illustrate the process.

https://cdn.auth0.com/blog/laravel-auth/mvc-diagram.png

A detailed description of the directory structure is provided here.

Interesting readings

  • Laravel documentation — a very detailed and nicely written.
  • Best Practices — we try to follow them on Lychee.
  • Dynamic Dependency Injection — Lychee and Laravel uses them a lot.
  • Request Validation — We still need to see if this can be applied here.

{tip} Caught a mistake or want to contribute to the documentation? Edit this page on Github!