Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Синхронизация с laravel/laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaoda committed Jun 25, 2017
1 parent 6c9a01b commit 74ed681
Show file tree
Hide file tree
Showing 23 changed files with 111 additions and 80 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/node_modules
/public/storage
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vagrant
Homestead.json
Homestead.yaml
.env
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ class LoginController extends Controller
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
$this->middleware('guest')->except('logout');
}
}
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public function __construct()
protected function validator(array $data)
{
return $this->getValidationFactory()->make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
]);
}

Expand Down
2 changes: 1 addition & 1 deletion app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [
'App\Events\SomeEvent' => [
'App\Events\Event' => [
'App\Listeners\EventListener',
],
];
Expand Down
2 changes: 1 addition & 1 deletion artisan
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $status = $kernel->handle(
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running. We will fire off the shutdown events
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
| into the script here so we do not have to manually load any of
| our application's PHP classes. It just feels great to relax.
|
*/

Expand Down
17 changes: 14 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"name": "laravel/laravel",
"name": "laravelrus/skeleton",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"keywords": ["framework", "laravel", "laravelrus"],
"license": "MIT",
"type": "project",
"authors": [
{
"name": "JhaoDa",
"email": "[email protected]"
},
{
"name": "atehnix",
"homepage": "https://vk.com/atehnix"
}
],
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
Expand Down Expand Up @@ -49,6 +59,7 @@
},
"config": {
"preferred-install": "dist",
"sort-packages": true
"sort-packages": true,
"optimize-autoloader": true
}
}
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| any other location as required by the application or its packages.
*/

'name' => 'Laravel',
'name' => env('APP_NAME', 'Laravel'),

/*
|--------------------------------------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
Expand All @@ -66,6 +67,17 @@
'sslmode' => 'prefer',
],

'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
],

],

/*
Expand Down
4 changes: 2 additions & 2 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
|
*/

'default' => 'local',
'default' => env('FILESYSTEM_DRIVER', 'local'),

/*
|--------------------------------------------------------------------------
Expand All @@ -26,7 +26,7 @@
|
*/

'cloud' => 's3',
'cloud' => env('FILESYSTEM_CLOUD', 's3'),

/*
|--------------------------------------------------------------------------
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{
"private": true,
"scripts": {
"dev": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.15.3",
"bootstrap-sass": "^3.3.7",
"cross-env": "^3.2.3",
"jquery": "^3.1.1",
"laravel-mix": "^0.8.1",
"laravel-mix": "^1.0",
"lodash": "^4.17.4",
"vue": "^2.1.10"
}
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Feature Tests">
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>

<testsuite name="Unit Tests">
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
Expand Down
8 changes: 2 additions & 6 deletions public/css/app.css

Large diffs are not rendered by default.

51 changes: 22 additions & 29 deletions public/js/app.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

require('./bootstrap');

window.Vue = require('vue');

/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
Expand Down
37 changes: 22 additions & 15 deletions resources/assets/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ window._ = require('lodash');
* code may be modified to fit the specific needs of your application.
*/

window.$ = window.jQuery = require('jquery');
try {
window.$ = window.jQuery = require('jquery');

require('bootstrap-sass');

/**
* Vue is a modern JavaScript library for building interactive web interfaces
* using reactive data binding and reusable components. Vue's API is clean
* and simple, leaving you to focus on building your next great project.
*/

window.Vue = require('vue');
require('bootstrap-sass');
} catch (e) {}

/**
* We'll load the axios HTTP library which allows us to easily issue requests
Expand All @@ -27,18 +21,31 @@ window.Vue = require('vue');

window.axios = require('axios');

window.axios.defaults.headers.common = {
'X-CSRF-TOKEN': window.Laravel.csrfToken,
'X-Requested-With': 'XMLHttpRequest'
};
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"
// import Echo from 'laravel-echo'

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

// window.Echo = new Echo({
// broadcaster: 'pusher',
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/sass/app.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Fonts
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");

// Variables
@import "variables";
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'ipv4' => 'The :attribute must be a valid IPv4 address.',
'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.',
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
Expand Down
6 changes: 4 additions & 2 deletions resources/lang/ru/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
|--------------------------------------------------------------------------
|
| Последующие языковые строки содержат сообщения по-умолчанию, используемые
| классом, проверяющим значения (валидатором).Некоторые из правил имеют
| классом, проверяющим значения (валидатором). Некоторые из правил имеют
| несколько версий, например, size. Вы можете поменять их на любые
| другие, которые лучше подходят для вашего приложения.
|
Expand Down Expand Up @@ -48,6 +48,8 @@
'in_array' => 'Поле :attribute не существует в :other.',
'integer' => 'Поле :attribute должно быть целым числом.',
'ip' => 'Поле :attribute должно быть действительным IP-адресом.',
'ipv4' => 'Поле :attribute должно быть действительным IPv4-адресом.',
'ipv6' => 'Поле :attribute должно быть действительным IPv6-адресом.',
'json' => 'Поле :attribute должно быть JSON строкой.',
'max' => [
'numeric' => 'Поле :attribute не может быть более :max.',
Expand Down Expand Up @@ -84,7 +86,7 @@
'string' => 'Поле :attribute должно быть строкой.',
'timezone' => 'Поле :attribute должно быть действительным часовым поясом.',
'unique' => 'Такое значение поля :attribute уже существует.',
'uploaded' => 'Не удалось загрузить файл :attribute.',
'uploaded' => 'Загрузка поля :attribute не удалась.',
'url' => 'Поле :attribute имеет ошибочный формат.',

/*
Expand Down
4 changes: 2 additions & 2 deletions resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ config('app.locale') }}">
<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down
4 changes: 2 additions & 2 deletions webpack.mix.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mix } = require('laravel-mix');
let mix = require('laravel-mix');

/*
|--------------------------------------------------------------------------
Expand All @@ -12,4 +12,4 @@ const { mix } = require('laravel-mix');
*/

mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
.sass('resources/assets/sass/app.scss', 'public/css');

0 comments on commit 74ed681

Please sign in to comment.