diff --git a/src/docs/frontend/blade.md b/src/docs/frontend/blade.md index 70c3807..5558ee2 100644 --- a/src/docs/frontend/blade.md +++ b/src/docs/frontend/blade.md @@ -6,9 +6,9 @@ import VideoModal from '@theme/components/shared/VideoModal.vue' -Blade is a templating engine included with Laravel that helps you create dynamic views easily. Unlike other templating engines, Blade allows you to use regular PHP code inside your templates together with all the goodness it offers you. Behind the scenes, Blade templates are turned into plain PHP and cached, so they run quickly without slowing down your app. Blade files use the `.blade.php` extension to distinguish them from regular PHP files. +Blade is Laravel's own templating engine that makes creating dynamic views easy. It lets you mix regular PHP code with its own features for more flexibility, has a clean syntax and caches your views for faster performance. -Leaf Blade is a port of the [jenssegers/blade](https://github.com/jenssegers/blade) package that allows you to use blade templates in your Leaf PHP projects. +Leaf Blade is an adaptation of the original Blade package that allows you to use Blade templates in your Leaf PHP projects powered by [jenssegers/blade](https://github.com/jenssegers/blade). @@ -27,13 +27,7 @@ This video by The Net Ninja will help you get started with blade. ## Setting Up -::: info Blade + Leaf MVC - -Blade comes with Leaf MVC out of the box, fully configured and ready to use, so you can skip this section if you're using Leaf MVC. - -::: - -You can install Leaf Blade using the Leaf CLI: +Blade comes with Leaf MVC out of the box, fully configured and ready to use, however, if you're using Leaf on its own, you can install Blade using the Leaf CLI or Composer. ::: code-group @@ -47,7 +41,9 @@ composer require leafs/blade ::: -After this, you just need to inform Leaf of Blade's existence: +::: details Configuring your paths + +After installing Blade in your Leaf app, you just need to inform Leaf of Blade's existence: ```php:no-line-numbers app()->attachView(Leaf\Blade::class); @@ -62,6 +58,10 @@ app()->blade()->configure([ ]); ``` +Once again, this is only necessary if you're using Leaf on its own. If you're using Leaf MVC, Blade is already set up for you. + +::: + Magic! You can now use Blade to create and render your views. ## Creating Blade Views @@ -99,11 +99,13 @@ echo app()->blade()->render('hello', ['name' => 'Michael']); This will render the `hello.blade.php` view and pass in a variable called `name` with the value `Michael`. When you open the view in your browser, you should see a big "Hello, Michael" on your screen. - + + ## Creating a Library diff --git a/src/public/sponsors.json b/src/public/sponsors.json index ff9e6b9..446405e 100644 --- a/src/public/sponsors.json +++ b/src/public/sponsors.json @@ -11,11 +11,6 @@ "url": "https://www.algolia.com/", "img": "https://avatars.githubusercontent.com/u/2034458?s=200&v=4" }, - { - "name": "Digital Ocean", - "url": "https://www.digitalocean.com/", - "img": "https://avatars.githubusercontent.com/u/4650108?s=200&v=4" - }, { "name": "Terry", "url": "https://github.com/terrybr", @@ -23,6 +18,11 @@ } ], "pastSponsors": [ + { + "name": "Digital Ocean", + "url": "https://www.digitalocean.com/", + "img": "https://avatars.githubusercontent.com/u/4650108?s=200&v=4" + }, { "name": "JetBrains", "url": "https://www.jetbrains.com/",