Skip to content

Commit 18fd21b

Browse files
committed
generate Auth scaffoldind and install npm packages
1 parent 7da68b7 commit 18fd21b

20 files changed

+249
-7657
lines changed

app/Http/Controllers/HomeController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct()
1919
/**
2020
* Show the application dashboard.
2121
*
22-
* @return \Illuminate\Http\Response
22+
* @return \Illuminate\Contracts\Support\Renderable
2323
*/
2424
public function index()
2525
{

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"barryvdh/laravel-debugbar": "^3.2",
2121
"facade/ignition": "^1.4",
2222
"fzaninotto/faker": "^1.4",
23+
"laravel/ui": "^1.1",
2324
"mockery/mockery": "^1.0",
2425
"nunomaduro/collision": "^3.0",
2526
"phpunit/phpunit": "^8.0"

composer.lock

+58-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
"@fortawesome/free-solid-svg-icons": "^5.11.2",
1515
"autosize": "^4.0.2",
1616
"axios": "^0.19",
17-
"bootstrap": "^4.3.1",
17+
"bootstrap": "^4.0.0",
1818
"cross-env": "^5.2.1",
19-
"jquery": "^3.4.1",
19+
"jquery": "^3.2",
2020
"laravel-mix": "^4.1.4",
2121
"lodash": "^4.17.15",
2222
"markdown-it": "^8.4.2",
2323
"markdown-it-prism": "^2.0.3",
24-
"popper.js": "^1.15.0",
24+
"popper.js": "^1.12",
2525
"resolve-url-loader": "^2.3.1",
26-
"sass": "^1.23.0",
27-
"sass-loader": "^7.3.1",
26+
"sass": "^1.20.1",
27+
"sass-loader": "7.*",
2828
"vue": "^2.5.17",
2929
"vue-izitoast": "^1.2.1",
3030
"vue-template-compiler": "^2.6.10"

resources/js/app.js

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
21
/**
32
* First we will load all of this project's JavaScript dependencies which
43
* includes Vue and other libraries. It is a great starting point when
54
* building robust, powerful web applications using Vue and Laravel.
65
*/
76

87
require('./bootstrap');
9-
require('./fontawesome');
108

119
window.Vue = require('vue');
1210

13-
import VueIziToast from 'vue-izitoast';
14-
import 'izitoast/dist/css/iziToast.min.css';
15-
import Authorization from './authorization/authorize';
11+
/**
12+
* The following block of code may be used to automatically register your
13+
* Vue components. It will recursively scan this directory for the Vue
14+
* components and automatically register them with their "basename".
15+
*
16+
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
17+
*/
18+
19+
// const files = require.context('./', true, /\.vue$/i)
20+
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
1621

17-
Vue.use(VueIziToast);
18-
Vue.use(Authorization);
22+
Vue.component('example-component', require('./components/ExampleComponent.vue').default);
1923

2024
/**
2125
* Next, we will create a fresh Vue application instance and attach it to
2226
* the page. Then, you may begin adding components to this application
2327
* or customize the JavaScript scaffolding to fit your unique needs.
2428
*/
25-
Vue.component('question-page', require('./pages/QuestionPage.vue').default);
2629

2730
const app = new Vue({
28-
el: '#app'
31+
el: '#app',
2932
});

resources/js/bootstrap.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
window._ = require('lodash');
32

43
/**
@@ -24,27 +23,13 @@ window.axios = require('axios');
2423

2524
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
2625

27-
/**
28-
* Next we will register the CSRF Token as a common header with Axios so that
29-
* all outgoing HTTP requests automatically have it attached. This is just
30-
* a simple convenience so we don't have to attach every token manually.
31-
*/
32-
33-
let token = document.head.querySelector('meta[name="csrf-token"]');
34-
35-
if (token) {
36-
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
37-
} else {
38-
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
39-
}
40-
4126
/**
4227
* Echo exposes an expressive API for subscribing to channels and listening
4328
* for events that are broadcast by Laravel. Echo and event broadcasting
4429
* allows your team to easily build robust real-time web applications.
4530
*/
4631

47-
// import Echo from 'laravel-echo'
32+
// import Echo from 'laravel-echo';
4833

4934
// window.Pusher = require('pusher-js');
5035

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<template>
2+
<div class="container">
3+
<div class="row justify-content-center">
4+
<div class="col-md-8">
5+
<div class="card">
6+
<div class="card-header">Example Component</div>
7+
8+
<div class="card-body">
9+
I'm an example component.
10+
</div>
11+
</div>
12+
</div>
13+
</div>
14+
</div>
15+
</template>
16+
17+
<script>
18+
export default {
19+
mounted() {
20+
console.log('Component mounted.')
21+
}
22+
}
23+
</script>

resources/sass/_variables.scss

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
$color-white: #fff;
2-
31
// Body
4-
$body-bg: $color-white;
2+
$body-bg: #f8fafc;
53

64
// Typography
7-
$font-family-sans-serif: "Raleway", sans-serif;
5+
$font-family-sans-serif: 'Nunito', sans-serif;
86
$font-size-base: 0.9rem;
97
$line-height-base: 1.6;
108

11-
$color-green: rgb(95, 187, 126);
9+
// Colors
10+
$blue: #3490dc;
11+
$indigo: #6574cd;
12+
$purple: #9561e2;
13+
$pink: #f66d9b;
14+
$red: #e3342f;
15+
$orange: #f6993f;
16+
$yellow: #ffed4a;
17+
$green: #38c172;
18+
$teal: #4dc0b5;
19+
$cyan: #6cb2eb;

resources/sass/app.scss

+2-102
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,8 @@
1-
21
// Fonts
3-
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
2+
@import url('https://fonts.googleapis.com/css?family=Nunito');
43

54
// Variables
6-
@import "variables";
5+
@import 'variables';
76

87
// Bootstrap
98
@import '~bootstrap/scss/bootstrap';
10-
11-
body {
12-
background: #f5f8fa;
13-
}
14-
15-
.navbar-laravel {
16-
background-color: #fff;
17-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
18-
}
19-
20-
.counters {
21-
margin-right: 30px;
22-
font-size: 10px;
23-
text-align: center;
24-
25-
strong {
26-
display: block;
27-
font-size: 2em;
28-
}
29-
30-
.vote, .answer {
31-
width: 60px;
32-
height: 60px;
33-
}
34-
35-
.status {
36-
&.unanswered {
37-
border: none;
38-
}
39-
40-
&.answered {
41-
border: 1px solid $color-green;
42-
color: $color-green;
43-
}
44-
45-
&.answered-accepted {
46-
background: $color-green;
47-
color: $color-white;
48-
}
49-
}
50-
51-
.view {
52-
margin-top: 10px;
53-
}
54-
}
55-
56-
form.form-delete {
57-
display: inline;
58-
}
59-
60-
.vote-controls {
61-
min-width: 60px;
62-
margin-right: 30px;
63-
text-align: center;
64-
color: $gray-700;
65-
66-
span, a {
67-
display: block;
68-
}
69-
70-
span {
71-
&.votes-count {
72-
font-size:25px;
73-
}
74-
&.favorites-count {
75-
font-size:12px;
76-
}
77-
}
78-
79-
a {
80-
cursor: pointer;
81-
color: $gray-600;
82-
83-
&.off, &.off:hover {
84-
color: $gray-500;
85-
}
86-
87-
&.favorite {
88-
&.favorited, &.favorited:hover {
89-
color: $warning;
90-
}
91-
}
92-
93-
&.vote-accepted {
94-
color: $green;
95-
}
96-
}
97-
}
98-
99-
.post {
100-
padding: 20px 0;
101-
&:not(:last-child) {
102-
border-bottom: 1px solid rgba($black, .1);
103-
}
104-
}
105-
106-
[v-cloak] {
107-
display: none;
108-
}

0 commit comments

Comments
 (0)