Skip to content

Commit 758e249

Browse files
committed
feat: update videos for docs
1 parent ae501ed commit 758e249

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

src/docs/cli/creating-an-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The Leaf CLI is a powerful tool and offers multiple ways to create a new Leaf ap
1515
<VideoModal
1616
buttonText="Leaf CLI walkthrough"
1717
description="You can take a look at our leaf cli setup walkthrough on youtube."
18-
videoUrl="https://www.youtube.com/embed/yb3LUYHtopQ"
18+
videoUrl="https://www.youtube.com/embed/d3Y-aOPLf4c"
1919
/>
2020

2121
## Basic Installation

src/docs/cli/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Leaf CLI is a command line tool that helps you create, manage and deploy Leaf ap
1818
<VideoModal
1919
buttonText="CLI installation walkthrough"
2020
description="You can take a look at our leaf cli setup walkthrough on youtube."
21-
videoUrl="https://www.youtube.com/embed/yb3LUYHtopQ"
21+
videoUrl="https://www.youtube.com/embed/jqkear8zue8"
2222
/>
2323

2424
*This guide will assume that your system meets all the [technical requirements](/docs/installation#technical-requirements).*

src/docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ leaf serve
4848
<VideoModal
4949
buttonText="Setup a project via CLI"
5050
subject="Watch the leaf installation walkthrough"
51-
videoUrl="https://www.youtube.com/embed/PuOk5xqTIsA"
51+
videoUrl="https://www.youtube.com/embed/d3Y-aOPLf4c"
5252
/>
5353

5454
## Manual Installation

src/docs/routing/index.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22

33
<!-- markdownlint-disable no-inline-html -->
44

5+
<script setup>
6+
import VideoModal from '@theme/components/shared/VideoModal.vue'
7+
</script>
8+
59
Routing is the foundation of every web application. It's the process of defining the URL structure of your application and how it responds to requests. Leaf comes with a powerful router that simplifies the way you define routes in your application. You can take routing as one fancy traffic officer that directs traffic to the right place.
610

11+
<VideoModal
12+
buttonText="Basic routing with Leaf"
13+
description="In this video, we look at how to create routes for your Leaf application"
14+
videoUrl="https://www.youtube.com/embed/BWWVR9bSiQ0"
15+
/>
16+
717
## Create a route
818

919
Every route has a URL (the web address the user visits) and an HTTP method (like GET, POST, etc.), which tells the server what action to take. For example, if you create a route for a GET request to `/home`, the user can access that page by visiting `http://example.com/home`. This way, different URLs and methods control how users interact with your app.
@@ -102,7 +112,13 @@ app()->run();
102112

103113
In big applications, you might have to reference a route over and over again. When you change the route URL, you'll have to change it everywhere you referenced it. To avoid this, you can name your routes and reference them by their name. This will save you a lot of time and prevent errors.
104114

105-
Leaf router allows you name routes by using route options. Route options allow you to configure a route in a more advanced way. You can set route options by passing an array with configuration options as the second argument to the whatever route you ar e wofking on.
115+
Leaf router allows you name routes by using route params. They allow you add extra options to your routes like a route name, middleware, etc. You can set route options by passing an array with configuration options as the second argument to the whatever route you are working on.
116+
117+
<VideoModal
118+
buttonText="Named routes in Leaf"
119+
description="Route parameters help you define extra options for your application routes, let's take a look"
120+
videoUrl="https://www.youtube.com/embed/_0B9Zoxgv64"
121+
/>
106122

107123
```php
108124
app()->get('/home', ['name' => 'home', function () {

0 commit comments

Comments
 (0)