Skip to content

Instantly share code, notes, and snippets.

View nulpatrol's full-sized avatar

Rostyslav Khaniukov nulpatrol

View GitHub Profile
@nulpatrol
nulpatrol / test.php
Created March 11, 2018 18:16
test.php
<?php
class Human {
public $name;
public $values = [];
public $surname;
public function __construct($name)
{
$this->name = $name;
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
"sourceType": "module",
},
"env": {
"browser": true,
},
'extends': [
{
name: 'lease_wrap_create',
path: '/lease',
component: 'lease/Lease',
redirect: {
name: 'lease_step1',
},
children: [
{
path: 'step1',
@nulpatrol
nulpatrol / package.json
Last active January 6, 2018 14:10
Only front-end for SPA
{
"scripts": {
"dev": "NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
}
}
{
name: 'lease_wrap_create',
path: '/lease',
component: 'lease/Lease',
redirect: {
name: 'lease_step1',
},
children: [
{
path: 'step1',
@nulpatrol
nulpatrol / .babelrc.js
Last active December 6, 2017 15:07
Async components - Vue
{
"presets": ["es2015", "es2016", "es2017"],
"plugins": ["transform-runtime", "syntax-dynamic-import"]
}
@nulpatrol
nulpatrol / .eslintrc
Created November 28, 2017 12:16
ESLint Vue Plugin
{
"root": true,
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 2017,
"sourceType": "module"
},
"env": {
"browser": true
@nulpatrol
nulpatrol / App.vue
Created November 13, 2017 08:24
App.vue
<template>
<div id="app" @keyup.esc="closeAllModal">
<div ref="modals">
<!-- Sign in -->
<transition name="slide-fade" mode="out-in">
<div v-if="$store.getters.signInModal" class="modal-wrap">
<div class="modal-custom" v-on-click-outside="closeSignInModal">
<span @click="closeSignInModal" class="close"></span>
<h1 class="paragraph-head">{{ $t('translation.login') }}</h1>
<p>{{ $t("translation.welcomeToKantor") }}</p>
@nulpatrol
nulpatrol / webpack.js
Created November 10, 2017 09:09
webpack.js
const { mix } = require('laravel-mix');
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.webpackConfig({
module: {
rules: [
{
test: /\.(js|vue)$/,
enforce: 'pre',
public function changePassword()
{
try {
$user = User::findOrFail(request()->input('id'));
if (Hash::check(request()->input('password'), $user->password)) {
throw ValidationException::withMessages([
'password' => ['translation.newPasswordMustBeDifferent']
]);
}