Download the PHP package markup-carve/laravel-carve without Composer

On this page you can find all versions of the php package markup-carve/laravel-carve. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-carve

Laravel Carve

CI PHP PHPStan

Carve markup language integration for Laravel: Blade directives, services, validation, and caching.

View the live demo →

Authoring in Laravel

Render structured values with Carve::render(), store source with the AsCarve Eloquent cast, and use <x-carve> or static .crv views in Blade. Validation supports content presets, lint findings and character limits. Artisan commands render, convert and lint documents.

See Authoring in Laravel for these APIs, imports, string helpers, converter customization and cache configuration.

Installation

The service provider and Carve facade alias are auto-discovered via Laravel's package discovery.

Optionally publish the config:

Usage

Blade Directives

Facade

Dependency Injection

Configuration

symbols maps :name: shortcodes to trusted raw HTML. Symbol values are inserted without escaping, so never populate this option from user input. Set source_lines to true to add 1-based data-source-line attributes to rendered blocks for editor preview scroll-sync. Both options are configured per converter profile.

File includes

Blade directives and string methods never read files. To enable includes for trusted file-backed content, configure an absolute containment root and call the explicit file API:

Carve::toHtmlFile() returns only the HTML. Nested paths resolve relative to the file containing each directive. Traversal and symlink escapes are refused. Warnings sent to Laravel's logger omit resolver details and replace outside paths.

include_root has to be an absolute path. A relative one is refused rather than resolved against the working directory, which is arbitrary with respect to the document, so a misconfigured root raises at boot instead of widening silently.

When package caching is enabled, a cached file render is served only while every recorded dependency still hashes the same, so editing an included file cannot serve the parent page's stale HTML. Missing targets are recorded too: creating one is what makes its directive start working.

Multiple Converter Profiles

Use different configurations for different contexts:

Safe Mode

Safe mode is enabled by default for XSS protection. Disable only for trusted content:

Extensions

Enable carve-php extensions per converter:

Available extensions:

See Extensions documentation for detailed configuration options.

Client-side diagram rendering

The diagram extensions emit a <pre class="LANG"> hydration element; the browser turns it into a picture. Mermaid, WaveDrom, Vega-Lite and Chart each render once you load their library. Graphviz and D2 render fully offline with the WebAssembly helpers from @markup-carve/carve-grammars (no server, no external call):

PlantUML is the exception - it has no practical in-browser renderer and needs a Kroki server:

⚠️ Privacy / GDPR: the default Kroki server is the public https://kroki.io, so the PlantUML source is sent to a third party outside your domain. For sensitive content, or to stay offline, point server at a self-hosted or localhost Kroki so no data leaves your control, and disclose the external call to end users where required. For a build-time / SSR pipeline, render diagrams server-side instead so no client JS ships.

Validation Rule

Validate that a field contains valid Carve markup:

Laravel Boost

The package ships Laravel Boost resources: a core guideline and a carve-development skill under resources/boost. Apps using Boost pick them up on php artisan boost:install or boost:update, so AI agents write Carve (not Markdown) and use the safe rendering APIs.

Documentation

Full documentation: markup-carve.github.io/laravel-carve

Demo Application

A full runnable demo app lives at laravel-carve-demo: the Blade directives, facade and service usage, form validation, safe-mode comparison, static render mode, plain text extraction and the extension set.

laravel-carve demo

What is Carve?

Carve is a lightweight markup language for structured documents, with clear, consistent syntax. It supports rich document features such as footnotes, definition lists, task lists, and math.

Learn more about Carve syntax at github.com/markup-carve/carve.

Ecosystem

This package is part of the Carve organization - the spec with its conformance corpus, three byte-identical reference implementations (JS, PHP, Rust), editor plugins, and framework integrations. See awesome-carve for a curated list of everything Carve.


All versions of laravel-carve with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
markup-carve/carve-php Version ^0.1.11
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/view Version ^11.0 || ^12.0 || ^13.0
illuminate/console Version ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^11.0 || ^12.0 || ^13.0
symfony/finder Version ^7.0 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package markup-carve/laravel-carve contains the following files

Loading the files please wait ...