Commit 1a278a41 authored by Kittisak Maneewong's avatar Kittisak Maneewong

Update Preset

parent 52bb744a
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AppController extends Controller
{
public function index() {
return view('app');
}
}
...@@ -1543,12 +1543,6 @@ ...@@ -1543,12 +1543,6 @@
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
"dev": true "dev": true
}, },
"bootstrap": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz",
"integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==",
"dev": true
},
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
...@@ -5082,12 +5076,6 @@ ...@@ -5082,12 +5076,6 @@
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
"dev": true "dev": true
}, },
"jquery": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
"integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==",
"dev": true
},
"js-levenshtein": { "js-levenshtein": {
"version": "1.1.6", "version": "1.1.6",
"resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz",
...@@ -6304,12 +6292,6 @@ ...@@ -6304,12 +6292,6 @@
"find-up": "^3.0.0" "find-up": "^3.0.0"
} }
}, },
"popper.js": {
"version": "1.14.7",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.7.tgz",
"integrity": "sha512-4q1hNvoUre/8srWsH7hnoSJ5xVmIL4qgz+s4qf2TnJIMyZFUFMGH+9vE7mXynAlHSZ/NdTmmow86muD0myUkVQ==",
"dev": true
},
"portfinder": { "portfinder": {
"version": "1.0.20", "version": "1.0.20",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz",
...@@ -8671,6 +8653,11 @@ ...@@ -8671,6 +8653,11 @@
"integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==", "integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==",
"dev": true "dev": true
}, },
"validate.js": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/validate.js/-/validate.js-0.12.0.tgz",
"integrity": "sha512-/x2RJSvbqEyxKj0RPN4xaRquK+EggjeVXiDDEyrJzsJogjtiZ9ov7lj/svVb4DM5Q5braQF4cooAryQbUwOxlA=="
},
"vary": { "vary": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
...@@ -8717,6 +8704,11 @@ ...@@ -8717,6 +8704,11 @@
"vue-style-loader": "^4.1.0" "vue-style-loader": "^4.1.0"
} }
}, },
"vue-router": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.2.tgz",
"integrity": "sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg=="
},
"vue-style-loader": { "vue-style-loader": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz",
...@@ -8743,6 +8735,16 @@ ...@@ -8743,6 +8735,16 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true "dev": true
}, },
"vuetify": {
"version": "1.5.7",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.5.7.tgz",
"integrity": "sha512-e7Vvj9gh41Pth7pXJxH1hrm8wfnvWt3nvxPCnwBWTgr4kiUXTG4CaUBqWVVgyfLjJGJSyR1y1EoRNEP5tJv0HQ=="
},
"vuex": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.0.tgz",
"integrity": "sha512-mdHeHT/7u4BncpUZMlxNaIdcN/HIt1GsGG5LKByArvYG/v6DvHcOxvDCts+7SRdCoIRGllK8IMZvQtQXLppDYg=="
},
"watchpack": { "watchpack": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
......
...@@ -11,16 +11,19 @@ ...@@ -11,16 +11,19 @@
}, },
"devDependencies": { "devDependencies": {
"axios": "^0.18", "axios": "^0.18",
"bootstrap": "^4.0.0",
"cross-env": "^5.1", "cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^4.0.7", "laravel-mix": "^4.0.7",
"lodash": "^4.17.5", "lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1", "resolve-url-loader": "^2.3.1",
"sass": "^1.15.2", "sass": "^1.15.2",
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"vue": "^2.5.17", "vue": "^2.5.17",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.10"
},
"dependencies": {
"validate.js": "^0.12.0",
"vue-router": "^3.0.2",
"vuetify": "^1.5.7",
"vuex": "^3.1.0"
} }
} }
This diff is collapsed.
This diff is collapsed.
<template>
<div>
<router-view></router-view>
</div>
</template>
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue'); window.Vue = require('vue');
import Vue from 'vue';
/** import Vuetify from 'vuetify';
* The following block of code may be used to automatically register your import VueRouter from 'vue-router';
* Vue components. It will recursively scan this directory for the Vue import Vuex from 'vuex';
* components and automatically register them with their "basename".
* import App from './App.vue';
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component> import { routes } from './router';
*/ import stores from './store';
// const files = require.context('./', true, /\.vue$/i); Vue.use(Vuetify);
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)); Vue.use(VueRouter);
Vue.use(Vuex);
Vue.component('example-component', require('./components/ExampleComponent.vue').default); Vue.component('example-component', require('./components/ExampleComponent.vue').default);
/** const router = new VueRouter({
* Next, we will create a fresh Vue application instance and attach it to routes,
* the page. Then, you may begin adding components to this application mode: 'history'
* or customize the JavaScript scaffolding to fit your unique needs. });
*/
const store = new Vuex.Store(stores);
const app = new Vue({ const app = new Vue({
el: '#app' el: '#app',
router,
store,
render: h => h(App)
}); });
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
try {
window.Popper = require('popper.js').default;
window.$ = window.jQuery = require('jquery');
require('bootstrap');
} catch (e) {}
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
/**
* Next we will register the CSRF Token as a common header with Axios so that
* all outgoing HTTP requests automatically have it attached. This is just
* a simple convenience so we don't have to attach every token manually.
*/
let token = document.head.querySelector('meta[name="csrf-token"]');
if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
// import Echo from 'laravel-echo'
// window.Pusher = require('pusher-js');
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// encrypted: true
// });
import Home from './views/Home.vue';
export const routes = [
{
path: '/',
name: 'Home',
component: Home
}
];
\ No newline at end of file
export default {
state: {
message: 'Kittisak Maneewong'
},
mutations: {
},
actions: {
},
getters: {
welcome (state) {
return state.message;
}
}
};
<template>
<div>
Home, {{ welcome }}
</div>
</template>
<script>
export default {
computed: {
welcome () {
return this.$store.getters.welcome;
}
}
}
</script>
// Body
$body-bg: #f8fafc;
// Typography
$font-family-sans-serif: "Nunito", sans-serif;
$font-size-base: 0.9rem;
$line-height-base: 1.6;
// Colors
$blue: #3490dc;
$indigo: #6574cd;
$purple: #9561e2;
$pink: #f66D9b;
$red: #e3342f;
$orange: #f6993f;
$yellow: #ffed4a;
$green: #38c172;
$teal: #4dc0b5;
$cyan: #6cb2eb;
// Fonts // Fonts
@import url('https://fonts.googleapis.com/css?family=Nunito'); @import url('https://fonts.googleapis.com/css?family=Nunito');
@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons');
// Variables // Vuetify
@import 'variables'; @import '~vuetify/dist/vuetify.min.css';
// Bootstrap
@import '~bootstrap/scss/bootstrap';
.navbar-laravel {
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<title>Laravel</title> <title>CO-OP Search</title>
<!-- Fonts --> <!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<!-- Styles --> <!-- Styles -->
<style> <style>
...@@ -81,9 +82,8 @@ ...@@ -81,9 +82,8 @@
@endif @endif
<div class="content" id="app"> <div class="content" id="app">
<example-component></example-component>
</div> </div>
</div> </div>
<script src="/js/app.js"></script> <script src="{{ asset('js/app.js') }}"></script>
</body> </body>
</html> </html>
...@@ -11,6 +11,4 @@ ...@@ -11,6 +11,4 @@
| |
*/ */
Route::get('/', function () { Route::get('/{any}', 'AppController@index')->where('any', '.*');
return view('welcome');
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment