Skip to content

Commit

Permalink
Merge pull request #217 from fey/fix-link-with-version
Browse files Browse the repository at this point in the history
Fix link with version in documentation
  • Loading branch information
freekmurze authored Mar 23, 2024
2 parents 4f418db + 0df69d7 commit df15763
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/general-usage/core-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ weight: 1

## `Element` classes

This package contains several element classes under the `Spatie\Html\Elements` namespace. It's possible to generate any HTML element with any attribute via these classes and the [fluent element methods](/laravel-html/v1/general-usage/element-methods).
This package contains several element classes under the `Spatie\Html\Elements` namespace. It's possible to generate any HTML element with any attribute via these classes and the [fluent element methods](/laravel-html/general-usage/element-methods).

`Element` classes on their own don't have any knowledge of the outside world. That's where the `Spatie\Html\Html` builder comes into play.

## `Html` Builder class

The `Spatie\Html\Html` builder is used to build proper HTML using its [builder methods](/laravel-html/v1/general-usage/html-builder). It will also couple `Spatie\Html\Elements` to other concepts like requests, sessions and models.
The `Spatie\Html\Html` builder is used to build proper HTML using its [builder methods](/laravel-html/general-usage/html-builder). It will also couple `Spatie\Html\Elements` to other concepts like requests, sessions and models.

For example when building input fields the `Html` builder will pull old values from the session (on a failed form request) or use values of a given model for the `value` attribute of the input.

Because the `Html` builder will generally return `Spatie\Html\Elements`, you can chain most of the [elements' fluent methods](/laravel-html/v1/general-usage/element-methods) directly onto the builder.
Because the `Html` builder will generally return `Spatie\Html\Elements`, you can chain most of the [elements' fluent methods](/laravel-html/general-usage/element-methods) directly onto the builder.

## The Difference Between Builder Params and Element Methods

Expand Down
2 changes: 1 addition & 1 deletion docs/general-usage/element-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ weight: 3

This package includes some element classes out of the box, others can be created using the [generic `Spatie\Html\Elements\Element` class](#generic-codeelementcode).

All elements can use the [base element methods](/laravel-html/v1/general-usage/element-methods). Some elements also have some element specific methods to easily set common attributes. These element specific methods can be found bellow.
All elements can use the [base element methods](/laravel-html/general-usage/element-methods). Some elements also have some element specific methods to easily set common attributes. These element specific methods can be found bellow.

## Generic `Element`

Expand Down
1 change: 0 additions & 1 deletion docs/general-usage/extending.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ If you want to extend the Html package, you can do the following.

Create a class that extends Html:


```php
<?php

Expand Down
2 changes: 1 addition & 1 deletion docs/general-usage/html-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ weight: 2

## Building general elements

The following builder methods can be used to generate general HTML elements like links, `div`s, `span`s, etc... All these methods return instances of `Spatie\Html\Elements`. Of course all [element methods](/laravel-html/v1/general-usage/element-methods) are available on the returned instances.
The following builder methods can be used to generate general HTML elements like links, `div`s, `span`s, etc... All these methods return instances of `Spatie\Html\Elements`. Of course all [element methods](/laravel-html/general-usage/element-methods) are available on the returned instances.

- `function a($href = null, $text = null): A`
- `function button($text = null, $type = 'button'): Button`
Expand Down
2 changes: 1 addition & 1 deletion docs/general-usage/the-class-helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: The class() helper
weight: 5
---

The `class` method on `Html` is a helper to render a `class` attribute similar to [Vue.js' `:class` property](https://vuejs.org/v2/guide/class-and-style.html#Object-Syntax).
The `class` method on `Html` is a helper to render a `class` attribute similar to [Vue.js' `:class` property](https://vuejs.org/guide/essentials/class-and-style.html#Object-Syntax).

It expects an array (or a `Collection`), and will toggle a set of classes depending on the values of the array.

Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This package helps you generate HTML using a clean, simple and easy to read API.

### Generating elements

For example creating a new `span` element with a class is super easy with the [fluent methods for elements](/laravel-html/v1/general-usage/element-methods):
For example creating a new `span` element with a class is super easy with the [fluent methods for elements](/laravel-html/general-usage/element-methods):

```php
html()->span()->text('Hello world!')->class('fa fa-eye');
Expand Down

0 comments on commit df15763

Please sign in to comment.