Download the PHP package ngangchill/blade without Composer

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

Ngangchill\Blade

This is a standalone package for laravel blade with some extra function such as partial, some usefull directives & extensions.Thanks for using.

use:

$pathsToTemplates = __DIR__ . '/views';
$pathToCompiledTemplates = __DIR__ . '/compiled';

//fire laravel blade statically
Ngangchill\Blade\Blade::fire()->setPaths($pathsToTemplates, $pathToCompiledTemplates);

// or 
$app = new Ngangchill\Blade\Blade();
$app->setPaths($pathsToTemplates, $pathToCompiledTemplates);

ALL DONE done... lets play with laravel Blade Templates. Now you can use every Blade functions as documented in laravel bladetemplate docs.

Example:

$name = 'Skyfall';

echo View::make('index', ['name' => $name])->render();

// Add a location to the array of view locations.
View::addLocation($newPath);

// lets register a new directives
Blade::directive('hellow', function ($name) {
    return "";
});

// For more info read laravel Blade Template Docs 

KEEP IN MIND: Special situation [if you want to use Illuminate\Support\Facades\Blade ]

If you initiate blade class Ngangchill\Blade\Blade::fire()->setPaths('viewPath', 'compiledPath') than nothing to worry. But if you use an use statment for Ngangchill\Blade\Blade class Than you have be carefull to avoid unwanted error by setting an alias for Ngangchill\Blade\Blade class or adding a trilling slash '\' before Illuminate\Support\Facades\Blade.See the example below

To use laravel blade facades call it as -

use Ngangchill\Blade\Blade;

//fire laravel blade
Blade::fire()->setPaths($pathsToTemplates, $pathToCompiledTemplates);

//Now call **Illuminate\Support\Facades\Blade** as \Blade::()....
\Blade::directive('datetime', function ($expression) {
    return "";
});

or

Set an alias:

use Ngangchill\Blade\Blade as ViewFactory;
//then
ViewFactory::fire()->setPaths(......);
Blade::directive('datetime', function ($expression) {
    return "";
});

Otherwise it may throughs unwanted error.

Read More on laravel.com

Extra features:

Creating a Partial

We use the @render('block-to-render') directive to render a block of content that was provided via the respective @block directive. Note that we can also provide a default value.

View a Partial

Partials start with the @partial('path.to.view') directive, which accepts the view you want the partial to extend from, and end with the @endpartial directive.

Blocks within partials behave the same way as sections within templates. They capture a piece of data that will be rendered into the extended view.

Special thanks to crhayes

Available Directives:

@explode()
@implode()
@dd()
@dump()
@datetime()
@date()
@time()
@use()
@namespace()
@fa()

All versions of blade with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/view Version ~5.2.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 ngangchill/blade contains the following files

Loading the files please wait ....