Skip to content

Commit 45162d8

Browse files
committed
feat: update docs to match packages
1 parent 1f8d891 commit 45162d8

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

src/docs/cli/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ If this command does not work, you can try these common locations:
5757
- macOS: `$HOME/.composer/vendor/bin`
5858
- GNU / Linux Distributions: `$HOME/.config/composer/vendor/bin` or `$HOME/.composer/vendor/bin`
5959

60-
### Adding to PATH
60+
## Adding to PATH
6161

6262
Once you have the location, you can add it to your PATH. On Mac and Linux, you can do this by running these in your terminal:
6363

src/docs/frontend/tailwind.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ php leaf view:install --tailwind
2020

2121
This command will install Tailwind CSS and its dependencies, create a Tailwind configuration file, and set up your CSS file to import Tailwind CSS. It will also add your CSS file to Vite as an entry point.
2222

23+
## Using Tailwind
24+
25+
Once setup, Leaf will include all the Tailwind imports which means you can jump into your UI and start writing your components with Tailwind. It also includes the tailwind config in the root of your application. This allows you to define all the configuration for your project if it does not match what Leaf has generated for you.
26+
27+
You can then go ahead to test out that your Tailwind install works fine:
28+
29+
```html
30+
<body>
31+
<h1 class="text-4xl text-blue-600">Welcome to Tailwind</h1>
32+
<p class="text-center">Leaf is amazing!</p>
33+
</body>
34+
```
35+
2336
## Manual Installation
2437

2538
Leaf MVC comes with Vite out of the box, which is a modern build tool that supports Tailwind CSS out of the box. To get started, you need to install Tailwind CSS and its dependencies:

src/docs/http/cookies.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,9 @@ cookie()->delete('name');
106106
```
107107

108108
:::
109+
110+
You may also choose to delete all your cookies, for instance if you detect an authentication or authorization breech in your application. You can do this using the `deleteAll()` method on Leaf cookies.
111+
112+
```php
113+
cookie()->deteleAll();
114+
```

src/docs/http/session.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ if (session()->has('firstName')) {
6464
}
6565
```
6666

67-
By default, the `has()` method will only return `true` if the key exists and is not `null`. If you want to check if a key exists even if it's `null`, you can pass `false` as the second parameter.
67+
<!-- By default, the `has()` method will only return `true` if the key exists and is not `null`. If you want to check if a key exists even if it's `null`, you can pass `true` as the second parameter.
6868
6969
```php
7070
// nullableItem is null
7171
72-
$exists = session()->has('nullableItem', false);
72+
$exists = session()->has('nullableItem', true);
7373
7474
echo $exists; // true
75-
```
75+
``` -->
7676

7777
## Getting session data
7878

0 commit comments

Comments
 (0)