laravel-rust 0.1.0

Laravel for Rust: a full-stack Rust web framework, inspired by PHP Laravel
Documentation
//! 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(crate) use laravel_http::view::*;
#[doc(hidden)]
pub use laravel_http::view::{__private, data};
#[doc(inline)]
pub use laravel_http::view::{
    AttributeValue, Attributes, DataLayers, Engine, Html, IntoViewData, Template, TemplateError, View, ViewConfig,
    ViewData, ViewError, ViewFile, ViewFinder, ViewSource, exists, js, share, view, vite, vite_react_refresh,
};
#[cfg(feature = "minijinja")]
#[doc(inline)]
pub use laravel_http::view::{MiniJinja, minijinja};