Skip to content

Commit e600a57

Browse files
committed
add assets
add php cs
1 parent 74e22d4 commit e600a57

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+8085
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ composer.phar
44
composer.lock
55
.DS_Store
66
Thumbs.db
7+
.php_cs.cache

.php_cs

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?php
2+
3+
$rules = [
4+
'array_syntax' => [
5+
'syntax' => 'short',
6+
],
7+
'blank_line_after_namespace' => true,
8+
'blank_line_after_opening_tag' => true,
9+
'blank_line_before_return' => true,
10+
'braces' => true,
11+
'cast_spaces' => true,
12+
'concat_space' => ['spacing' => 'none'],
13+
'no_multiline_whitespace_around_double_arrow' => true,
14+
'no_empty_statement' => true,
15+
'elseif' => true,
16+
'simplified_null_return' => true,
17+
'encoding' => true,
18+
'single_blank_line_at_eof' => true,
19+
'no_extra_consecutive_blank_lines' => [
20+
'use',
21+
],
22+
'no_spaces_after_function_name' => true,
23+
'no_trailing_comma_in_list_call' => true,
24+
'not_operator_with_successor_space' => true,
25+
'function_declaration' => true,
26+
'include' => true,
27+
'indentation_type' => true,
28+
'no_alias_functions' => true,
29+
'line_ending' => true,
30+
'lowercase_constants' => true,
31+
'lowercase_keywords' => true,
32+
'method_argument_space' => true,
33+
'trailing_comma_in_multiline_array' => true,
34+
'no_multiline_whitespace_before_semicolons' => true,
35+
'single_import_per_statement' => true,
36+
'no_leading_namespace_whitespace' => true,
37+
'no_blank_lines_after_class_opening' => true,
38+
'no_blank_lines_after_phpdoc' => true,
39+
'object_operator_without_whitespace' => true,
40+
'binary_operator_spaces' => [
41+
'align_equals' => false,
42+
],
43+
'no_spaces_inside_parenthesis' => true,
44+
'phpdoc_indent' => true,
45+
'phpdoc_inline_tag' => true,
46+
'phpdoc_no_access' => true,
47+
'phpdoc_no_package' => true,
48+
'phpdoc_scalar' => true,
49+
'phpdoc_summary' => true,
50+
'phpdoc_to_comment' => true,
51+
'phpdoc_no_alias_tag' => [
52+
'type' => 'var',
53+
],
54+
'self_accessor' => true,
55+
'phpdoc_var_without_name' => true,
56+
'no_leading_import_slash' => true,
57+
'no_short_echo_tag' => true,
58+
'full_opening_tag' => true,
59+
'no_trailing_comma_in_singleline_array' => true,
60+
'single_blank_line_before_namespace' => true,
61+
'single_line_after_imports' => true,
62+
'single_quote' => true,
63+
'no_singleline_whitespace_before_semicolons' => true,
64+
'cast_spaces' => true,
65+
'standardize_not_equals' => true,
66+
'ternary_operator_spaces' => true,
67+
'no_trailing_whitespace' => true,
68+
'unary_operator_spaces' => true,
69+
'trim_array_spaces' => true,
70+
'no_unused_imports' => true,
71+
'visibility_required' => true,
72+
'no_whitespace_in_blank_line' => true,
73+
'ordered_imports' => [
74+
'sortAlgorithm' => 'length'
75+
],
76+
'ordered_class_elements' => [
77+
'order' => ['use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'destruct', 'magic', 'phpunit', 'method_public', 'method_protected', 'method_private']
78+
]
79+
];
80+
81+
return PhpCsFixer\Config::create()
82+
->setRiskyAllowed(true)
83+
->setRules($rules)
84+
->setFinder(
85+
PhpCsFixer\Finder::create()
86+
->exclude('storage')
87+
->exclude('vendor')
88+
->notPath('config/routes.php')
89+
->notName('*.blade.php')
90+
->in(__DIR__)
91+
);

resources/js/app.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* First we will load all of this project's JavaScript dependencies which
3+
* includes Vue and other libraries. It is a great starting point when
4+
* building robust, powerful web applications using Vue and Laravel.
5+
*/
6+
7+
require('./bootstrap');
8+
9+
window.Vue = require('vue');
10+
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))
21+
22+
// Vue.component('example-component', require('./components/ExampleComponent.vue').default);
23+
24+
/**
25+
* Next, we will create a fresh Vue application instance and attach it to
26+
* the page. Then, you may begin adding components to this application
27+
* or customize the JavaScript scaffolding to fit your unique needs.
28+
*/
29+
30+
const app = new Vue({
31+
el: '#app',
32+
});

resources/js/bootstrap.js

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
window._ = require('lodash');
2+
3+
/**
4+
* We'll load the axios HTTP library which allows us to easily issue requests
5+
* to our Laravel back-end. This library automatically handles sending the
6+
* CSRF token as a header based on the value of the "XSRF" token cookie.
7+
*/
8+
9+
window.axios = require('axios');
10+
11+
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
12+
13+
window.jQuery = window.$ = require('jquery');
14+
15+
window.moment = require('moment');
16+
17+
require('popper.js');
18+
require('assets/resources/js/bootstrap');
19+
require('jquery.nicescroll');
20+
21+
require('./stiesla/stisla');
22+
require('./stiesla/scripts');
23+
require('./stiesla/custom');
24+
25+
/**
26+
* Next we will register the CSRF Token as a common header with Axios so that
27+
* all outgoing HTTP requests automatically have it attached. This is just
28+
* a simple convenience so we don't have to attach every token manually.
29+
*/
30+
31+
let token = document.head.querySelector('meta[name="csrf-token"]');
32+
33+
if (token) {
34+
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
35+
} else {
36+
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
37+
}
38+
39+
/**
40+
* Echo exposes an expressive API for subscribing to channels and listening
41+
* for events that are broadcast by Laravel. Echo and event broadcasting
42+
* allows your team to easily build robust real-time web applications.
43+
*/
44+
45+
// import Echo from 'laravel-echo'
46+
47+
// window.Pusher = require('pusher-js');
48+
49+
// window.Echo = new Echo({
50+
// broadcaster: 'pusher',
51+
// key: process.env.MIX_PUSHER_APP_KEY,
52+
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
53+
// encrypted: true
54+
// });

resources/js/stiesla/custom.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
*
3+
* You can write your JS code here, DO NOT touch the default style file
4+
* because it will make it harder for you to update.
5+
*
6+
*/
7+
8+
"use strict";

0 commit comments

Comments
 (0)