2017 © Pedro Peláez
 

library laravel-vue-bridge

A bridge to expose Laravel variables and routes in Vue and Vuex

image

ianrothmann/laravel-vue-bridge

A bridge to expose Laravel variables and routes in Vue and Vuex

  • Sunday, March 18, 2018
  • by ianrothmann
  • Repository
  • 1 Watchers
  • 0 Stars
  • 162 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 20 % Grown

The README.md

LaravelVueBridge

A bridge for exposing Laravel variables and routes inside vue components. It supports Vuex. For use with Multi Page Applications using multiple Vue components. The idea is to get the best of both, between what Laravel and Vue offers., (*1)

This package should be used with the VueBridge npm package (https://github.com/ianrothmann/VueBridgeJs)., (*2)

Installation

composer require ianrothmann/laravel-vue-bridge, (*3)

In config/app.php, (*4)

Service provider, (*5)

IanRothmann\LaravelVueBridge\ServiceProviders\VueBridgeServiceProvider::class

Facade, (*6)

'VueBridge' =>IanRothmann\LaravelVueBridge\Facades\VueBridge::class

In your main blade file, before, (*7)

<script src="{{ mix('js/app.js') }}"></script> 

you should add, (*8)

{!! VueBridge::scripts(get_defined_vars()) !!}

Exposing variables

In your controller:, (*9)

VueBridge::exposeVariables([array of variable names to expose]);

VueBridge::hideVariables([array of variable names to hide, all others will be exposed]);

VueBridge::exposeAllVariables();

VueBridge::hideAllVariables();

Exposing Routes

In web.php or in middleware. Routes are hidden by default:, (*10)

VueBridge::exposeAllRoutes(); //exposes all named routes

VueBridge::exposeRoutes(([array of route names]);

VueBridge::hideRoutes([array of route names]);

More documentation to follow later, (*11)

The Versions

18/03 2018

dev-master

9999999-dev

A bridge to expose Laravel variables and routes in Vue and Vuex

  Sources   Download

Apache-2.0 Apache2

The Requires

 

by Ian Rothmann

18/03 2018

0.6.1

0.6.1.0

A bridge to expose Laravel variables and routes in Vue and Vuex

  Sources   Download

Apache-2.0

The Requires

 

by Ian Rothmann

16/03 2018

0.6.0

0.6.0.0

A bridge to expose Laravel variables and routes in Vue and Vuex

  Sources   Download

Apache2

The Requires

 

by Ian Rothmann

21/09 2017

0.5.3

0.5.3.0

A bridge to expose Laravel variables and routes in Vue and Vuex

  Sources   Download

Apache2

The Requires

 

by Ian Rothmann

02/09 2017

0.5.2

0.5.2.0

A bridge to expose Laravel variables and routes in Vue and Vuex

  Sources   Download

Apache2

The Requires

 

by Ian Rothmann

29/07 2017

0.5.1

0.5.1.0

A bridge to expose Laravel variables and routes in Vue and Vuex

  Sources   Download

Apache2

The Requires

 

by Ian Rothmann

20/04 2017

0.5.0

0.5.0.0

A bridge to expose Laravel variables and routes in Vue and Vuex

  Sources   Download

Apache2

The Requires

 

by Ian Rothmann