Download the PHP package fiskhandlarn/blade without Composer

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

blade

A library for using Laravel Blade templates in WordPress/WordPlate.

Build Status Coverage Status Total Downloads Latest Version License

Installation

Require this package, with Composer, in the root directory of your project.

Usage

Render

Use helper function blade:

(This renders and echoes the template /resources/views/index.blade.php and caches it to /storage/views.)

... or instantiate Blade by passing the folder(s) where your view files are located, and a cache folder. Render a template by calling the render method.

Render with data from a controller class

Use helper function blade_controller:

(This renders and echoes the template /resources/views/index.blade.php with data generated from App\Controllers\Index.)

Controller classes must extend Fiskhandlarn\BladeController.

... or use the renderController method on a Blade object:

You can also pass additional data (this won't override properties from the controller though):

See soberwp/controller for more info on how to use controllers.

Supported features:

Unsupported features:

Untested features:

Unnecessary features:

Custom directive

Create a custom directive with helper function blade_directive:

... or use the directive method on a Blade object:

Then you can use the directive in your templates:

Custom composer

Create a custom composer with helper function blade_composer:

... or use the composer method on a Blade object:

Share variables

Share variables across all templates with helper function blade_share:

... or use the share method on a Blade object:

Extension

The Blade class passes all method calls to the internal compiler (see documentation) or view factory (see documentation for info on exists, first and creator).

Cache

If WP_DEBUG is set to true templates will always be rendered and updated.

Multisite

If run on a WordPress Multisite the cached files will be separated in subfolders by each site's blog id.

Filters

Use the blade/view/paths filter to customize the base paths where your templates are stored. (Default value is /resources/views.)

Use the blade/cache/path filter to customize the cache folder path. (Default value is /storage/views.)

Use the blade/cache/path filter to control creation of cache folder. (Default value is true.)

Use the blade/controller/namespace filter to customize the controller namespace. (Default value is App\Controllers.)

License

GNU GPL 3.0+


All versions of blade with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
illuminate/view Version ^8.83
soberwp/controller Version ^2.1
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 fiskhandlarn/blade contains the following files

Loading the files please wait ....