Download the PHP package daun/laravel-latte without Composer

On this page you can find all versions of the php package daun/laravel-latte. 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-latte

Laravel Latte

Latest Version on Packagist Test Status Code Coverage License

Add support for the Latte templating engine in Laravel views.

Features

Installation

Requirements

Usage

Installing the composer package will automatically register a Service Provider with your Laravel app. You can now render Latte files like you would any other view. The example below will render the view at resources/views/home.latte using Latte.

Configuration

The package will read its configuration from config/latte.php. Use Artisan to publish and customize the default config file:

Localization

The package includes a custom translator extension that acts as a bridge to Laravel's translation service. It allows using any translations registered in your app to be used in Latte views, using either the _ tag or the translate filter:

You can pass in parameters as usual:

Translate using a custom locale by passing it after or in place of the params:

Pluralization works using the transChoice filter.

Path resolution

The package includes a custom loader that allows including partials from subdirectories using Laravel's dot notation to specify folders.

To specifically include files relative to the current file, prefix the path with ./ or ../:

Default layout

If you require a common layout file for all views, you can define a default layout in config/latte.php. Any views without a specifically set layout will now be merged into that layout.

Configuring Latte

Extensions

To extend Latte and add your own tags, filters and functions, you can use the extensions array in config/latte.php to supply a list of Latte extensions to register automatically.

Facade

You can also directly access and configure the Latte engine instance from the Latte facade. Modify its config, add custom filters, etc.

Events

If you need to be notified when the Latte engine is created, listen for the LatteEngineCreated event to receive and customize the returned engine instance.

License

MIT


All versions of laravel-latte with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
latte/latte Version ^3.0
laravel/framework Version ^9.0 || ^10.0 || ^11.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 daun/laravel-latte contains the following files

Loading the files please wait ....