Link to SPA routes (VueJs, React, Angular) with Laravel router

// our web.php// First, a link to our spa.blade.php file containing the SPA
Route::view('/app/{any_path?}', 'spa')->where('any_path', '(.*)');
// Where we need the link, in our controller, mail etc..
url("/app/profile/{$user->username}")

So, let’s make Laravel aware of our SPA router links.

--

--

--

Founder binge.app. Curious dev. Laravel / Angular / VueJs / React Native / Docker. Love stand up shows.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

ES6 Default Parameter in JavaScript

Live search in nonreactive code

Race Condition issue

Javascript/Node.js in PayPal

Upgrading to Gatsby 3.0

One of the most popular scripting languages, JavaScript is used in all the web applications for…

Binary Search Trees with JavaScript

Announcing HackWithNativeBase

Ultimate Mac JavaScript & PHP development setup.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dejan Blazeski

Dejan Blazeski

Founder binge.app. Curious dev. Laravel / Angular / VueJs / React Native / Docker. Love stand up shows.

More from Medium

Build a Basic CRUD App with Laravel 8 and React.js

Enabling SSR on an existing React + Laravel App

React CRUD operations using PHP API and MySQL

Removing all Vue dependencies from Laravel in 4 steps