1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Views keep your HTML in templates under `resources/views`, apart from the handlers that
//! gather the data a page displays.
//!
//! [`view`] returns a [`View`], and the [`data!`] macro builds the data it displays. [`share`] and
//! [`ViewConfig::share`] give data to every view, [`vite`](vite()) renders Vite's asset tags, and the
//! [`Engine`] trait adds other template languages. To learn more, check out the
//! [views guide](https://github.com/laravel/rust-framework/blob/0.x/docs/views.md) and the
//! [templates guide](https://github.com/laravel/rust-framework/blob/0.x/docs/templates.md).
//!
//! Render a view with [`view`], passing its name and the data it displays. Names use dots for
//! directories, so `users.index` is `resources/views/users/index.html`.
//!
//! ```no_run
//! use laravel::view::{View, data, view};
//!
//! async fn index() -> View {
//! let users = vec!["Taylor", "Abigail"];
//!
//! view("users.index", data! { users })
//! }
//! ```
//!
//! The [`Engine`] registered for a view's extension renders the view's file. The built-in engine,
//! [`MiniJinja`], renders `.html` files written in Jinja's syntax. It needs the `minijinja`
//! feature:
//!
//! ```html
//! {% extends "layouts.app" %}
//!
//! {% block content %}
//! <ul>
//! {% for user in users %}
//! <li>{{ user }}</li>
//! {% endfor %}
//! </ul>
//! {% endblock %}
//! ```
//!
//! Packages add engines for other kinds of templates, and views of their own, through
//! [`ViewConfig`].
pub use *;
pub use ;
pub use ;
pub use ;