Phase

v0.4.0

AN EZ PZ SSR PHP VUE SPA ASAP. OMG!

Introducing Phase, a collection of glue code, helper functions, and attempted automation so that you can build your Laravel-backed Vue.js Single Page App easier than ever.
// Define your routes/web.php
Route::phase('/', 'HomeController@HomePage');
Route::phase('/about', 'HomeController@AboutPage');
<!-- And navigate there! -->
<RouterLink to="/">
  Go Home
</RouterLink>

<RouterLink :to="{ name: 'HomeController@AboutPage' }">
  About
</RouterLink>
// Load data from the Controller
public function LandingPage() {
  Vuex::state([
    'project' => 'Phase',
    'author'  => 'Reed Jones <reedjones@reedjones.com>',
    'repo'    => 'reed-jones/phase'
  ]);

  return Phase::view();
}
<!-- And access from the .Vue -->
<div>
  <a :href="`//github.com/${$store.state.repo}`">
    <h1>{{ $store.state.project }}</h1>
    <h2>{{ $store.state.author }}</h2>
    <h3>github: {{ $store.state.repo }}</h3>
  </a>
</div>
<!-- Fully Server Rendered -->
<div>
  <a href="//github.com/reed-jones/phase">
    <h1>Phase</h1>
    <h2>Reed Jones <reedjones@reedjones.com></h2>
    <h3>github: reed-jones/phase</h3>
  </a>
</div>

Changelog

npm (scoped) Packagist Version
Chipper CI

v0.4.0 - 2020-03-15

Added

  • Now follows any axios redirects (with page transition, enabled by default)
  • Customizable <head> section (meta tags, etc) using optional parts/head.blade.php
  • Route code splitting now available using the option codeSplit: true in webpack.mix.js

Changed

  • All automated ajax requests append phase=true to the query string.

Fixed

  • After using vue-router, then navigating to an external site, pressing 'back' no longer displays json