Skip to content
On this page

Leaf Codelabs

Codelabs is a space we created to give interactive tutorials on Leaf, PHP and JS concepts that help you achieve specific results in your apps. Codelabs takes one topic or "how-to" and dives deep into it, giving you all the information you need to successfully complete the tutorial yourself while also explaining useful concepts along the way.

Codelabs vs the Docs

How is codelabs different from the rest of our documentation? Why is this necessary?

  • Greater Focus: In the docs, we're essentially telling a story. Each section builds on and assumes knowledge from each previous section. In the codelabs section, each experiment can and should stand on its own. This means experiments can focus on one specific aspect of Leaf, rather than having to give a general overview.

  • Greater Depth: To avoid making the docs too long, we try to include only the simplest possible examples to help you understand each feature. Then we move on. In the codelabs section, we can include more complex examples, combining features in interesting ways. Each experiment can also be as long and detailed as it needs to be, in order to fully explore its niche.

  • Teaching PHP/JS: Although our docs are beginner friendly, we still assume basic familiarity with PHP concepts as we do not go over them into details in the docs. For example, we won't explain how forms and network requests work and how data is read. In codelabs however, essential PHP/JS features and concepts can be explored and explained in the context of how they help us build better Leaf apps.

  • Hands-on: Codelabs, unlike the docs packs in interactive hands-on tutorials which you can follow step-by-step. Each tutorial is specially crafted to help you "learn by doing" and is complementary to the docs. For this reason, you will always find links back to leaf, a module or a particular package.

Experiments

A codelab experiment is a single tutorial that focuses on a particular topic. It is interactive and in-depth, covering what is needed in full.

Below is a list of experiment topics.

TopicDescription
Hosting/DeploymentExperiments related to web/API deployment

We are migrating from codelabs.leafphp.dev to leafphp.dev/codelabs. Please bear with us as we move all the experiments here.

Contributing

If you don't find your topic here, you can simply create a pull request with your experiment in the topic folder you need. Find the full contribution guide here

Leaf Codelabs has loaded