Download the PHP package jhoff/blade-vue-directive without Composer

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

Laravel Blade Vue Directive

Laravel Blade Vue Directive provides blade directives for vue.js single file and inline template components.

Latest Stable Version Total Downloads MIT License Build Status Code Coverage Scrutinizer Code Quality

Upgrade from 1.1.x to 2.0.0

In 2.0, the @vue and @endvue directives have been renamed to @inlinevue and @endinlinevue. The new @vue and @endvue directives should now be used for non-inline components.

WARNING: You'll need to make sure that you run php artisan view:clear after upgrading

Installation

To install the Laravel Blade Vue Directive, simply run composer require jhoff/blade-vue-directive in a terminal, or if you prefer to manually install you can the following in your composer.json file and then run composer install from the terminal:

For Laravel 5.5 and later, the package will automatically register. If you're using Laravel before 5.5, then you need to add the provider to the providers array of config/app.php.

Usage

The Laravel Blade Vue Directive was written to be simple and intuitive to use. It's not opinionated about how you use your vue.js components. Simply provide a component name and (optionally) an associative array of properties.

Basic Example

Using the vue directive with no arguments in your blade file

Renders in html as

Note that the contents between the start and end tag are optional and will be provided as slot contents. To use an inline-template, use the @inlinevue directive instead:

Renders in html as

Scalars Example

Using the vue directive with an associative array as the second argument will automatically translate into native properties that you can use within your vue.js components.

Renders in html as

Then, to use the properties in your vue.js component, add them to props in your component definition. See Component::props for more information.

Booleans and Numbers Example

Properties that are booleans or numeric will be bound automatically as well

Renders in html as

Objects and Arrays Example

The vue directive will automatically handle any objects or arrays to make sure that vue.js can interact with them without any additional effort.

Renders in html as

Notice that the object is json encoded, html escaped and the property is prepended with : to ensure that vue will bind the value as data.

To use an object property in your component, make sure to make it an Object type:

camelCase to kebab-case

If you provide camel cased property names, they will automatically be converted to kebab case for you. This is especially useful since vue.js will still work with camelCase variable names.

Renders in html as

Just make sure that it's still camelCased in the component props definition:

Using compact to pass variables directly through

Just like when you render a view from a controller, you can use compact to pass a complex set of variables directly through to vue:

Renders in html as

Then in vue, make sure to define all of your properties:


All versions of blade-vue-directive with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
laravel/framework Version ^5.4|^6.0|^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 jhoff/blade-vue-directive contains the following files

Loading the files please wait ....