v0.6.1
// 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>
[composer] phased/state@0.6.1