Last active
June 11, 2020 15:40
-
-
Save marcelobbfonseca/9d1156ab3633793b765456c6a1f44bbc to your computer and use it in GitHub Desktop.
Example resources/views/welcome.blade.php resources/js/App.vue and resources/js/App.vue file for a laravel+vue SPA project. The main.js file in a VueCLI project is our app.js. I kept the app.js name from a default laravel project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import App from './App.vue' | |
import router from './router' | |
import store from './store' | |
import vuetify from './vuetify' | |
import Vuelidate from 'vuelidate' | |
Vue.use(Vuelidate) | |
Vue.config.productionTip = false | |
const app = new Vue({ | |
router, | |
store, | |
vuetify, | |
render: h => h(App) | |
}).$mount('#app') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-app> | |
<left-menu/> | |
<header-component/> | |
<v-content> | |
<router-view/> | |
</v-content> | |
<footer-component/> | |
</v-app> | |
</template> | |
<script> | |
import HeaderComponent from './components/HeaderComponent' | |
import FooterComponent from './components/FooterComponent' | |
import LeftMenu from './components/LeftMenu' | |
export default { | |
components: { | |
LeftMenu, | |
FooterComponent, | |
HeaderComponent, | |
}, | |
} | |
</script> | |
<style > | |
h1, h2, h3, p, span, div { | |
font-family: 'DDINRegular', Courier, monospace; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//routes/web.php | |
Route::get('/{any?}', function () { | |
return view('welcome'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/d-din" type="text/css"/> <!--just importing a font here. Don't mind me. --> | |
<title>My frontend testable site!</title> | |
</head> | |
<body> | |
<div id="app"> | |
</div> | |
<script src="/js/app.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment