Download the PHP package mozex/commonmark-routes without Composer

On this page you can find all versions of the php package mozex/commonmark-routes. 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 commonmark-routes

Use Laravel URL Helpers inside Markdown

Latest Version on Packagist GitHub Checks Workflow Status Docs License Total Downloads

A league/commonmark extension that lets you use route(), url(), and asset() inside your Markdown content. Write links and images using the same Laravel helpers you already use in Blade, and they'll resolve to real URLs when the Markdown is converted.

Read the full documentation at mozex.dev: searchable docs, version requirements, detailed changelog, and more.

Warning: This extension evaluates helper calls from the Markdown source. Only use it with trusted content that you control. Don't process user-submitted Markdown with this extension.

Table of Contents

Support This Project

I maintain this package along with several other open-source PHP packages used by thousands of developers every day.

If my packages save you time or help your business, consider sponsoring my work on GitHub Sponsors. Your support lets me keep these packages updated, respond to issues quickly, and ship new features.

Business sponsors get logo placement in package READMEs. See sponsorship tiers →

Installation

Requires PHP 8.2+ - see all version requirements

Install the package via Composer:

Usage

Register the extension with your CommonMark environment, then use route(), url(), or asset() in place of URLs in your Markdown.

Links

The route() helper works exactly the way it does in your PHP code. Named routes, parameters, query strings, relative URLs:

The url() helper generates URLs from plain paths:

The asset() helper resolves static file paths through Laravel's asset pipeline. This is especially useful in environments like Laravel Vapor where assets are served from S3 or CloudFront and relative paths won't work:

When the helper is used as both the link text and the URL, the resolved URL appears in both places:

Angle brackets work too, which can help with complex arguments:

You can freely mix helpers with regular Markdown links in the same document:

Images

Image syntax works the same way. Put a helper inside ![alt](...) and it resolves just like links do:

The asset() helper is the most common choice for images. If you're on Vapor or any setup that serves assets from a CDN, asset() gives you the correct absolute URL instead of a broken relative path.

Regular images without helpers pass through untouched:

For more details on CommonMark extensions and environments, check the CommonMark documentation.

Spatie Laravel Markdown

If you're using the Laravel Markdown package by Spatie, register the extension in config/markdown.php:

Resources

Visit the documentation site for searchable docs, auto-updated from this repository.

License

The MIT License (MIT). Please see License File for more information.


All versions of commonmark-routes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2.0
laravel/framework Version ^11.29|^12.12|^13.0
league/commonmark Version ^2.4
spatie/laravel-package-tools Version ^1.19.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 mozex/commonmark-routes contains the following files

Loading the files please wait ...