This commit is contained in:
splin94@yandex.ru 2023-11-09 21:22:52 +00:00
parent 3a4a328d80
commit 8e952437b5
122 changed files with 30351 additions and 3632 deletions

15
code/.editorconfig Executable file
View File

@ -0,0 +1,15 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2

1
code/.gitattributes vendored
View File

@ -2,3 +2,4 @@
*.css linguist-vendored *.css linguist-vendored
*.scss linguist-vendored *.scss linguist-vendored
*.js linguist-vendored *.js linguist-vendored
CHANGELOG.md export-ignore

690
code/.gitignore vendored
View File

@ -3,8 +3,694 @@
/public/storage /public/storage
/storage/*.key /storage/*.key
/vendor /vendor
/.idea .env
/.vagrant .env.backup
.phpunit.result.cache
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
npm-debug.log
yarn-error.log
### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
.idea/
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
*.iml
modules.xml
.idea/misc.xml
*.ipr
# Sonarlint plugin
.idea/sonarlint
### Intellij+iml ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### Intellij+iml Patch ###
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env .env
.env.test
.env*.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
### PHPCodeSniffer ###
# CodeSniffer
/vendor/*
/wpcs/*
### PhpStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### PhpStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
### PhpStorm+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### PhpStorm+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
# Sonarlint plugin
### PhpStorm+iml ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### PhpStorm+iml Patch ###
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
### vscode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
### WebStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### WebStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
### WebStorm+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### WebStorm+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
# Sonarlint plugin
### WebStorm+iml ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### WebStorm+iml Patch ###
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk

13
code/.styleci.yml Executable file
View File

@ -0,0 +1,13 @@
php:
preset: laravel
disabled:
- no_unused_imports
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
css: true

21
code/LICENSE Executable file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Faisal Ahmed
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

79
code/README.md Executable file
View File

@ -0,0 +1,79 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
## Uses
create a new repository using laravel-skeleton template
clone your newly created repository in your local machine then checkout specific branch which version of laravel you want to use.
`git checkout [branch name]`
#### Branch list and specification
- 6.x [laravel version 6.x]
- 7.x [laravel version 7.x]
- 8.x [laravel version 8.17.1]
- php8 [laravel version 8.x and php version 8]
## Package Included
- [Query Filter](https://github.com/Faisal50x/query-filter)
- [Laravel Permission](https://github.com/spatie/laravel-permission) *unpublished
- [Laravel IDE Helper (dev)](https://github.com/barryvdh/laravel-ide-helper)
- [Laravel Debugbar (dev)](https://github.com/barryvdh/laravel-debugbar) *unpublished
- [Telescope (dev)](https://github.com/laravel/telescope) *unpublished
## About Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Learning Laravel
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Laravel Sponsors
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
### Premium Partners
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[Many](https://www.many.co.uk)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- **[OP.GG](https://op.gg)**
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

View File

@ -1,46 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
class IdeHelperRun extends Command
{
/**
* @var \Illuminate\Foundation\Application
*/
protected $laravel;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ide-helper:run';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Generate a IDE Helper files if current environment is local.';
/**
* Execute the console command.
*/
public function handle()
{
if (! $this->laravel->getProvider(IdeHelperServiceProvider::class)) {
$this->info(sprintf(
'Skipped. IdeHelper not registered for %s environment.',
$this->laravel->environment()
));
return;
}
$this->call('ide-helper:generate');
$this->call('ide-helper:meta');
}
}

View File

@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel
* @var array * @var array
*/ */
protected $commands = [ protected $commands = [
Commands\IdeHelperRun::class //
]; ];
/** /**
@ -28,12 +28,14 @@ class Kernel extends ConsoleKernel
} }
/** /**
* Register the Closure based commands for the application. * Register the commands for the application.
* *
* @return void * @return void
*/ */
protected function commands() protected function commands()
{ {
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php'); require base_path('routes/console.php');
} }
} }

View File

@ -1,16 +0,0 @@
<?php
namespace App\Core\Eloquent;
use Illuminate\Database\Eloquent\Model as Eloquent;
abstract class Model extends Eloquent
{
/**
* @return string
*/
public static function getTableName()
{
return (new static)->getTable();
}
}

View File

@ -2,64 +2,39 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
{ {
/** /**
* A list of the exception types that should not be reported. * A list of the exception types that are not reported.
* *
* @var array * @var array
*/ */
protected $dontReport = [ protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class, //
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
]; ];
/** /**
* Report or log an exception. * A list of the inputs that are never flashed for validation exceptions.
* *
* This is a great spot to send exceptions to Sentry, Bugsnag, etc. * @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
/**
* Register the exception handling callbacks for the application.
* *
* @param \Exception $exception
* @return void * @return void
*/ */
public function report(Exception $exception) public function register()
{ {
parent::report($exception); $this->reportable(function (Throwable $e) {
} //
});
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest(route('login'));
} }
} }

View File

@ -1,30 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*/
public function __construct()
{
$this->middleware('guest');
}
}

View File

@ -1,37 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}

View File

@ -1,68 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
class RegisterController extends Controller
{
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/
use RegistersUsers;
/**
* Where to redirect users after registration.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return $this->getValidationFactory()->make($data, [
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \Illuminate\Database\Eloquent\Model|User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}

View File

@ -1,37 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class ResetPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Where to redirect users after resetting their password.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*/
public function __construct()
{
$this->middleware('guest');
}
}

View File

@ -2,10 +2,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController class Controller extends BaseController
{ {

View File

@ -14,7 +14,10 @@ class Kernel extends HttpKernel
* @var array * @var array
*/ */
protected $middleware = [ protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, // \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class, \App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
@ -37,8 +40,8 @@ class Kernel extends HttpKernel
], ],
'api' => [ 'api' => [
'throttle:60,1', 'throttle:api',
'bindings', \Illuminate\Routing\Middleware\SubstituteBindings::class,
], ],
]; ];
@ -50,11 +53,14 @@ class Kernel extends HttpKernel
* @var array * @var array
*/ */
protected $routeMiddleware = [ protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
]; ];
} }

View File

@ -0,0 +1,21 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string|null
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}

View File

@ -2,9 +2,9 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter; use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends BaseEncrypter class EncryptCookies extends Middleware
{ {
/** /**
* The names of the cookies that should not be encrypted. * The names of the cookies that should not be encrypted.

View File

@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
class PreventRequestsDuringMaintenance extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array
*/
protected $except = [
//
];
}

View File

@ -2,7 +2,9 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure; use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated class RedirectIfAuthenticated
@ -12,13 +14,17 @@ class RedirectIfAuthenticated
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @param string|null $guard * @param string|null ...$guards
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next, $guard = null) public function handle(Request $request, Closure $next, ...$guards)
{ {
if (Auth::guard($guard)->check()) { $guards = empty($guards) ? [null] : $guards;
return redirect('/home');
foreach ($guards as $guard) {
if (Auth::guard($guard)->check()) {
return redirect(RouteServiceProvider::HOME);
}
} }
return $next($request); return $next($request);

View File

@ -2,9 +2,9 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer; use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends BaseTrimmer class TrimStrings extends Middleware
{ {
/** /**
* The names of the attributes that should not be trimmed. * The names of the attributes that should not be trimmed.

View File

@ -0,0 +1,20 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustHosts as Middleware;
class TrustHosts extends Middleware
{
/**
* Get the host patterns that should be trusted.
*
* @return array
*/
public function hosts()
{
return [
$this->allSubdomainsOfApplicationUrl(),
];
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace App\Http\Middleware;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array|string|null
*/
protected $proxies;
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
}

View File

@ -2,9 +2,9 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends BaseVerifier class VerifyCsrfToken extends Middleware
{ {
/** /**
* The URIs that should be excluded from CSRF verification. * The URIs that should be excluded from CSRF verification.

43
code/app/Models/User.php Executable file
View File

@ -0,0 +1,43 @@
<?php
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
}

View File

@ -7,11 +7,16 @@ use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {
/** /**
* The application instance. * Register any application services.
* *
* @var \Illuminate\Foundation\Application * @return void
*/ */
protected $app; public function register()
{
if ($this->app->isLocal()) {
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
}
}
/** /**
* Bootstrap any application services. * Bootstrap any application services.
@ -22,17 +27,4 @@ class AppServiceProvider extends ServiceProvider
{ {
// //
} }
/**
* Register any application services.
*
* @return void
*/
public function register()
{
if ($this->app->isLocal()) {
$localProviders = config('app.local_providers', []);
array_map([$this->app, 'register'], $localProviders);
}
}
} }

View File

@ -3,6 +3,7 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider class AuthServiceProvider extends ServiceProvider
{ {
@ -12,7 +13,7 @@ class AuthServiceProvider extends ServiceProvider
* @var array * @var array
*/ */
protected $policies = [ protected $policies = [
// // 'App\Models\Model' => 'App\Policies\ModelPolicy',
]; ];
/** /**

View File

@ -2,8 +2,8 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast; use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider class BroadcastServiceProvider extends ServiceProvider
{ {

View File

@ -2,8 +2,10 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\Facades\Event; use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider class EventServiceProvider extends ServiceProvider
{ {
@ -13,8 +15,8 @@ class EventServiceProvider extends ServiceProvider
* @var array * @var array
*/ */
protected $listen = [ protected $listen = [
'App\Events\Event' => [ Registered::class => [
'App\Listeners\EventListener', SendEmailVerificationNotification::class,
], ],
]; ];
@ -25,8 +27,6 @@ class EventServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
parent::boot();
// //
} }
} }

View File

@ -2,19 +2,31 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\Facades\Route; use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider class RouteServiceProvider extends ServiceProvider
{ {
/** /**
* This namespace is applied to your controller routes. * The path to the "home" route for your application.
* *
* In addition, it is set as the URL generator's root namespace. * This is used by Laravel authentication to redirect users after login.
* *
* @var string * @var string
*/ */
protected $namespace = 'App\Http\Controllers'; public const HOME = '/home';
/**
* The controller namespace for the application.
*
* When present, controller route declarations will automatically be prefixed with this namespace.
*
* @var string|null
*/
// protected $namespace = 'App\\Http\\Controllers';
/** /**
* Define your route model bindings, pattern filters, etc. * Define your route model bindings, pattern filters, etc.
@ -23,51 +35,29 @@ class RouteServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
// $this->configureRateLimiting();
parent::boot(); $this->routes(function () {
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
});
} }
/** /**
* Define the routes for the application. * Configure the rate limiters for the application.
* *
* @return void * @return void
*/ */
public function map() protected function configureRateLimiting()
{ {
$this->mapApiRoutes(); RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
$this->mapWebRoutes(); });
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
} }
} }

106
code/app/Traits/HasFile.php Executable file
View File

@ -0,0 +1,106 @@
<?php
namespace App\Traits;
use Closure;
use Exception;
use Illuminate\Support\Arr;
use Illuminate\Http\Request;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Storage;
use Illuminate\Foundation\Http\FormRequest;
trait HasFile
{
/**
* @var array $paths
*/
public $paths = [];
/**
* @var string $disk
*/
private $disk = 'public';
/**
* @param string $fileName
* @param string $directory
* @param Request|FormRequest|null $request
* @return $this
*/
public function upload(string $fileName, string $directory = 'upload', $request = null):self
{
$request = $request ?? request();
if ($request->hasFile($fileName)) {
$this->paths = array_map(Closure::bind(function(UploadedFile $file)use($directory) {
return Storage::disk($this->disk = $this->disk ?? 'public')
->put($directory, $file);
}, $this), Arr::wrap($request->file($fileName)));
}
return $this;
}
/**
* @param string $disk
* @return $this
* @throws Exception
*/
public function disk(string $disk):self
{
if (empty(trim($disk))) {
throw new Exception("Disk can't empty string");
}
$this->disk = $disk;
return $this;
}
/**
* @return int
*/
public function hasFile(): int
{
return count($this->paths);
}
/**
* @return Collection
*/
public function filePaths(): Collection
{
return collect($this->paths);
}
/**
* @return string|null
*/
public function firstPath():?string
{
return $this->filePaths()->first();
}
/**
* @param string|null $filePath
* @return bool|int
* @throws Exception
*/
public function delete(string $filePath = null)
{
if(empty(trim($this->disk))) {
throw new Exception("Please select disk first!");
}
if (!is_null($filePath)) {
return Storage::disk($this->disk)->delete($filePath);
}
$count = 0;
if($this->hasFile()) {
$this->filePaths()->each(Closure::bind(function($path) use(&$count){
if (Storage::disk($this->disk)->delete($path)) {
$count++;
}
}, $this));
}
return $count;
}
}

View File

@ -1,38 +0,0 @@
<?php
namespace App;
use App\Core\Eloquent\Model;
use Illuminate\Auth\Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class User extends Model implements
AuthorizableContract,
AuthenticatableContract,
CanResetPasswordContract
{
use Authenticatable, Authorizable, CanResetPassword, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}

View File

@ -1,6 +1,8 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
define('LARAVEL_START', microtime(true));
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Register The Auto Loader | Register The Auto Loader
@ -13,7 +15,7 @@
| |
*/ */
require __DIR__.'/bootstrap/autoload.php'; require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php'; $app = require_once __DIR__.'/bootstrap/app.php';

View File

@ -12,7 +12,7 @@
*/ */
$app = new Illuminate\Foundation\Application( $app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../') $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
); );
/* /*

View File

@ -1,17 +0,0 @@
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| 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 we do not have to manually load any of
| our application's PHP classes. It just feels great to relax.
|
*/
require __DIR__.'/../vendor/autoload.php';

View File

@ -1,37 +1,49 @@
{ {
"name": "laravelrus/skeleton", "name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel", "laravelrus"],
"license": "MIT",
"type": "project", "type": "project",
"authors": [ "description": "The Laravel Framework.",
{ "keywords": [
"name": "JhaoDa", "framework",
"email": "jhaoda@gmail.com" "laravel"
},
{
"name": "atehnix",
"homepage": "https://vk.com/atehnix"
}
], ],
"license": "MIT",
"require": { "require": {
"php": ">=8.1", "php": "^7.3|^8.2",
"laravel/framework": "5.4.*", "faisal50x/query-filter": "^1.0",
"laravel/tinker": "~1.0", "fideloper/proxy": "^4.4",
"barryvdh/laravel-debugbar": "~2", "fruitcake/laravel-cors": "^2.0",
"barryvdh/laravel-ide-helper": "~2" "guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5",
"spatie/laravel-permission": "^3.18"
}, },
"require-dev": { "require-dev": {
"fzaninotto/faker": "~1.4", "barryvdh/laravel-debugbar": "^3.5",
"mockery/mockery": "0.9.*", "barryvdh/laravel-ide-helper": "^2.8",
"phpunit/phpunit": "^8" "facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/telescope": "^4.3",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": [
"barryvdh/laravel-ide-helper"
]
}
}, },
"autoload": { "autoload": {
"classmap": [
"database"
],
"psr-4": { "psr-4": {
"App\\": "app/" "App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
} }
}, },
"autoload-dev": { "autoload-dev": {
@ -39,27 +51,18 @@
"Tests\\": "tests/" "Tests\\": "tests/"
} }
}, },
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": { "scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [ "post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\"" "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
], ],
"post-create-project-cmd": [ "post-create-project-cmd": [
"php artisan key:generate" "@php artisan key:generate --ansi"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan ide-helper:run",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan ide-helper:run",
"php artisan optimize"
] ]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
} }
} }

6801
code/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ return [
| This value is the name of your application. This value is used when the | This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or | framework needs to place the application's name in a notification or
| any other location as required by the application or its packages. | any other location as required by the application or its packages.
|
*/ */
'name' => env('APP_NAME', 'Laravel'), 'name' => env('APP_NAME', 'Laravel'),
@ -21,7 +22,7 @@ return [
| |
| This value determines the "environment" your application is currently | This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various | running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file. | services the application utilizes. Set this in your ".env" file.
| |
*/ */
@ -38,7 +39,7 @@ return [
| |
*/ */
'debug' => env('APP_DEBUG', false), 'debug' => (bool) env('APP_DEBUG', false),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -53,6 +54,8 @@ return [
'url' => env('APP_URL', 'http://localhost'), 'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Timezone | Application Timezone
@ -64,7 +67,7 @@ return [
| |
*/ */
'timezone' => 'Europe/Moscow', 'timezone' => 'UTC',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -77,7 +80,7 @@ return [
| |
*/ */
'locale' => 'ru', 'locale' => 'en',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -92,6 +95,19 @@ return [
'fallback_locale' => 'en', 'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Encryption Key | Encryption Key
@ -107,23 +123,6 @@ return [
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
*/
'log' => env('APP_LOG', 'daily'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Autoloaded Service Providers | Autoloaded Service Providers
@ -166,7 +165,6 @@ return [
/* /*
* Package Service Providers... * Package Service Providers...
*/ */
Laravel\Tinker\TinkerServiceProvider::class,
/* /*
* Application Service Providers... * Application Service Providers...
@ -179,11 +177,6 @@ return [
], ],
'local_providers' => [
Barryvdh\Debugbar\ServiceProvider::class,
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Class Aliases | Class Aliases
@ -197,39 +190,42 @@ return [
'aliases' => [ 'aliases' => [
// 'App' => Illuminate\Support\Facades\App::class, 'App' => Illuminate\Support\Facades\App::class,
// 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Arr' => Illuminate\Support\Arr::class,
// 'Auth' => Illuminate\Support\Facades\Auth::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class,
// 'Blade' => Illuminate\Support\Facades\Blade::class, 'Auth' => Illuminate\Support\Facades\Auth::class,
// 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, 'Blade' => Illuminate\Support\Facades\Blade::class,
// 'Bus' => Illuminate\Support\Facades\Bus::class, 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
// 'Cache' => Illuminate\Support\Facades\Cache::class, 'Bus' => Illuminate\Support\Facades\Bus::class,
// 'Config' => Illuminate\Support\Facades\Config::class, 'Cache' => Illuminate\Support\Facades\Cache::class,
// 'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Config' => Illuminate\Support\Facades\Config::class,
// 'Crypt' => Illuminate\Support\Facades\Crypt::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class,
// 'DB' => Illuminate\Support\Facades\DB::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class,
// 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'DB' => Illuminate\Support\Facades\DB::class,
// 'Event' => Illuminate\Support\Facades\Event::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
// 'File' => Illuminate\Support\Facades\File::class, 'Event' => Illuminate\Support\Facades\Event::class,
// 'Gate' => Illuminate\Support\Facades\Gate::class, 'File' => Illuminate\Support\Facades\File::class,
// 'Hash' => Illuminate\Support\Facades\Hash::class, 'Gate' => Illuminate\Support\Facades\Gate::class,
// 'Lang' => Illuminate\Support\Facades\Lang::class, 'Hash' => Illuminate\Support\Facades\Hash::class,
// 'Log' => Illuminate\Support\Facades\Log::class, 'Http' => Illuminate\Support\Facades\Http::class,
// 'Mail' => Illuminate\Support\Facades\Mail::class, 'Lang' => Illuminate\Support\Facades\Lang::class,
// 'Notification' => Illuminate\Support\Facades\Notification::class, 'Log' => Illuminate\Support\Facades\Log::class,
// 'Password' => Illuminate\Support\Facades\Password::class, 'Mail' => Illuminate\Support\Facades\Mail::class,
// 'Queue' => Illuminate\Support\Facades\Queue::class, 'Notification' => Illuminate\Support\Facades\Notification::class,
// 'Redirect' => Illuminate\Support\Facades\Redirect::class, 'Password' => Illuminate\Support\Facades\Password::class,
// 'Redis' => Illuminate\Support\Facades\Redis::class, 'Queue' => Illuminate\Support\Facades\Queue::class,
// 'Request' => Illuminate\Support\Facades\Request::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class,
// 'Response' => Illuminate\Support\Facades\Response::class, 'Redis' => Illuminate\Support\Facades\Redis::class,
// 'Route' => Illuminate\Support\Facades\Route::class, 'Request' => Illuminate\Support\Facades\Request::class,
// 'Schema' => Illuminate\Support\Facades\Schema::class, 'Response' => Illuminate\Support\Facades\Response::class,
// 'Session' => Illuminate\Support\Facades\Session::class, 'Route' => Illuminate\Support\Facades\Route::class,
// 'Storage' => Illuminate\Support\Facades\Storage::class, 'Schema' => Illuminate\Support\Facades\Schema::class,
// 'URL' => Illuminate\Support\Facades\URL::class, 'Session' => Illuminate\Support\Facades\Session::class,
// 'Validator' => Illuminate\Support\Facades\Validator::class, 'Storage' => Illuminate\Support\Facades\Storage::class,
// 'View' => Illuminate\Support\Facades\View::class, 'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
], ],

View File

@ -44,6 +44,7 @@ return [
'api' => [ 'api' => [
'driver' => 'token', 'driver' => 'token',
'provider' => 'users', 'provider' => 'users',
'hash' => false,
], ],
], ],
@ -67,7 +68,7 @@ return [
'providers' => [ 'providers' => [
'users' => [ 'users' => [
'driver' => 'eloquent', 'driver' => 'eloquent',
'model' => App\User::class, 'model' => App\Models\User::class,
], ],
// 'users' => [ // 'users' => [
@ -96,7 +97,21 @@ return [
'provider' => 'users', 'provider' => 'users',
'table' => 'password_resets', 'table' => 'password_resets',
'expire' => 60, 'expire' => 60,
'throttle' => 60,
], ],
], ],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
]; ];

View File

@ -36,10 +36,16 @@ return [
'secret' => env('PUSHER_APP_SECRET'), 'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'), 'app_id' => env('PUSHER_APP_ID'),
'options' => [ 'options' => [
// 'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
], ],
], ],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',

View File

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Str;
return [ return [
/* /*
@ -11,8 +13,6 @@ return [
| using this caching library. This connection is used when another is | using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function. | not explicitly specified when executing a given caching function.
| |
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
*/ */
'default' => env('CACHE_DRIVER', 'file'), 'default' => env('CACHE_DRIVER', 'file'),
@ -26,6 +26,9 @@ return [
| well as their drivers. You may even define multiple stores for the | well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches. | same cache driver to group types of items stored in your caches.
| |
| Supported drivers: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb", "null"
|
*/ */
'stores' => [ 'stores' => [
@ -36,6 +39,7 @@ return [
'array' => [ 'array' => [
'driver' => 'array', 'driver' => 'array',
'serialize' => false,
], ],
'database' => [ 'database' => [
@ -57,7 +61,7 @@ return [
env('MEMCACHED_PASSWORD'), env('MEMCACHED_PASSWORD'),
], ],
'options' => [ 'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000, // Memcached::OPT_CONNECT_TIMEOUT => 2000,
], ],
'servers' => [ 'servers' => [
[ [
@ -70,7 +74,16 @@ return [
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'cache',
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
], ],
], ],
@ -86,6 +99,6 @@ return [
| |
*/ */
'prefix' => 'laravel', 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
]; ];

34
code/config/cors.php Executable file
View File

@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];

View File

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Str;
return [ return [
/* /*
@ -35,12 +37,15 @@ return [
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')), 'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '', 'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
], ],
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'), 'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -50,12 +55,17 @@ return [
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci', 'collation' => 'utf8mb4_unicode_ci',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true,
'strict' => true, 'strict' => true,
'engine' => null, 'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
], ],
'pgsql' => [ 'pgsql' => [
'driver' => 'pgsql', 'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'), 'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -63,12 +73,14 @@ return [
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public', 'schema' => 'public',
'sslmode' => 'prefer', 'sslmode' => 'prefer',
], ],
'sqlsrv' => [ 'sqlsrv' => [
'driver' => 'sqlsrv', 'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'), 'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'), 'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -76,6 +88,7 @@ return [
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true,
], ],
], ],
@ -99,20 +112,34 @@ return [
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Redis is an open source, fast, and advanced key-value store that also | Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems | provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in. | such as APC or Memcached. Laravel makes it easy to dig right in.
| |
*/ */
'redis' => [ 'redis' => [
'client' => 'predis', 'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],
'default' => [ 'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', '6379'),
'database' => 0, 'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
], ],
], ],

View File

@ -1,170 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Debugbar Settings
|--------------------------------------------------------------------------
|
| Debugbar is enabled by default, when debug is set to true in app.php.
| You can override the value by setting enable to true or false instead of null.
|
*/
'enabled' => null,
/*
|--------------------------------------------------------------------------
| Storage settings
|--------------------------------------------------------------------------
|
| DebugBar stores data for session/ajax requests.
| You can disable this, so the debugbar stores data in headers/session,
| but this can cause problems with large data collectors.
| By default, file storage (in the storage folder) is used. Redis and PDO
| can also be used. For PDO, run the package migrations first.
|
*/
'storage' => [
'enabled' => true,
'driver' => 'file', // redis, file, pdo, custom
'path' => storage_path('debugbar'), // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO)
'provider' => '' // Instance of StorageInterface for custom driver
],
/*
|--------------------------------------------------------------------------
| Vendors
|--------------------------------------------------------------------------
|
| Vendor files are included by default, but can be set to false.
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
| and for js: jquery and and highlight.js
| So if you want syntax highlighting, set it to true.
| jQuery is set to not conflict with existing jQuery scripts.
|
*/
'include_vendors' => true,
/*
|--------------------------------------------------------------------------
| Capture Ajax Requests
|--------------------------------------------------------------------------
|
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
| you can use this option to disable sending the data through the headers.
|
*/
'capture_ajax' => true,
/*
|--------------------------------------------------------------------------
| Clockwork integration
|--------------------------------------------------------------------------
|
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
*/
'clockwork' => false,
/*
|--------------------------------------------------------------------------
| DataCollectors
|--------------------------------------------------------------------------
|
| Enable/disable DataCollectors
|
*/
'collectors' => [
'phpinfo' => true, // Php version
'messages' => true, // Messages
'time' => true, // Time Datalogger
'memory' => true, // Memory usage
'exceptions' => true, // Exception displayer
'log' => true, // Logs from Monolog (merged in messages if enabled)
'db' => true, // Show database (PDO) queries and bindings
'views' => true, // Views with their data
'route' => true, // Current route information
'laravel' => false, // Laravel version and environment
'events' => false, // All events fired
'default_request' => false, // Regular or special Symfony request logger
'symfony_request' => true, // Only one can be enabled..
'mail' => true, // Catch mail messages
'logs' => false, // Add the latest log messages
'files' => false, // Show the included files
'config' => false, // Display config settings
'auth' => false, // Display Laravel authentication status
'gate' => false, // Display Laravel Gate checks
'session' => true, // Display session data
],
/*
|--------------------------------------------------------------------------
| Extra options
|--------------------------------------------------------------------------
|
| Configure some DataCollectors
|
*/
'options' => [
'auth' => [
'show_name' => false, // Also show the users name/email in the debugbar
],
'db' => [
'with_params' => true, // Render SQL with the parameters substituted
'timeline' => false, // Add the queries to the timeline
'backtrace' => false, // EXPERIMENTAL: Use a backtrace to find the origin of the query in your files.
'explain' => [ // EXPERIMENTAL: Show EXPLAIN output on queries
'enabled' => false,
'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
],
'mail' => [
'full_log' => false
],
'views' => [
'data' => false, //Note: Can slow down the application, because the data can be quite large..
],
'route' => [
'label' => true // show complete route on bar
],
'logs' => [
'file' => null
],
],
/*
|--------------------------------------------------------------------------
| Inject Debugbar in Response
|--------------------------------------------------------------------------
|
| Usually, the debugbar is added just before </body>, by listening to the
| Response after the App is done. If you disable this, you have to add them
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
*/
'inject' => true,
/*
|--------------------------------------------------------------------------
| DebugBar route prefix
|--------------------------------------------------------------------------
|
| Sometimes you want to set route prefix to be used by DebugBar to load
| its resources from. Usually the need comes from misconfigured web server or
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
|
*/
'route_prefix' => '_debugbar',
];

View File

@ -37,7 +37,7 @@ return [
| may even configure multiple disks of the same driver. Defaults have | may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options. | been setup for each driver as an example of the required options.
| |
| Supported Drivers: "local", "ftp", "s3", "rackspace" | Supported Drivers: "local", "ftp", "sftp", "s3"
| |
*/ */
@ -57,12 +57,29 @@ return [
's3' => [ 's3' => [
'driver' => 's3', 'driver' => 's3',
'key' => env('AWS_KEY'), 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET'), 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_REGION'), 'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'), 'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
], ],
], ],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
]; ];

52
code/config/hashing.php Executable file
View File

@ -0,0 +1,52 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],
];

View File

@ -1,168 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Filename & Format
|--------------------------------------------------------------------------
|
| The default filename (without extension) and the format (php or json)
|
*/
'filename' => '.ide.helper',
'format' => 'php',
/*
|--------------------------------------------------------------------------
| Fluent helpers
|--------------------------------------------------------------------------
|
| Set to true to generate commonly used Fluent methods
|
*/
'include_fluent' => false,
/*
|--------------------------------------------------------------------------
| Helper files to include
|--------------------------------------------------------------------------
|
| Include helper files. By default not included, but can be toggled with the
| -- helpers (-H) option. Extra helper files can be included.
|
*/
'include_helpers' => false,
'helper_files' => [
base_path() . '/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
],
/*
|--------------------------------------------------------------------------
| Model locations to include
|--------------------------------------------------------------------------
|
| Define in which directories the ide-helper:models command should look
| for models.
|
*/
'model_locations' => [
'app',
],
/*
|--------------------------------------------------------------------------
| Extra classes
|--------------------------------------------------------------------------
|
| These implementations are not really extended, but called with magic functions
|
*/
'extra' => [
'Eloquent' => ['Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'],
'Session' => ['Illuminate\Session\Store'],
],
'magic' => [
'Log' => [
'debug' => 'Monolog\Logger::addDebug',
'info' => 'Monolog\Logger::addInfo',
'notice' => 'Monolog\Logger::addNotice',
'warning' => 'Monolog\Logger::addWarning',
'error' => 'Monolog\Logger::addError',
'critical' => 'Monolog\Logger::addCritical',
'alert' => 'Monolog\Logger::addAlert',
'emergency' => 'Monolog\Logger::addEmergency',
],
],
/*
|--------------------------------------------------------------------------
| Interface implementations
|--------------------------------------------------------------------------
|
| These interfaces will be replaced with the implementing class. Some interfaces
| are detected by the helpers, others can be listed below.
|
*/
'interfaces' => [
],
/*
|--------------------------------------------------------------------------
| Support for custom DB types
|--------------------------------------------------------------------------
|
| This setting allow you to map any custom database type (that you may have
| created using CREATE TYPE statement or imported using database plugin
| / extension to a Doctrine type.
|
| Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
| 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
|
| This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
|
| The value of the array is an array of type mappings. Key is the name of the custom type,
| (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
| our case it is 'json_array'. Doctrine types are listed here:
| http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
|
| So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
|
| "postgresql" => array(
| "jsonb" => "json_array",
| ),
|
*/
'custom_db_types' => [
],
/*
|--------------------------------------------------------------------------
| Support for camel cased models
|--------------------------------------------------------------------------
|
| There are some Laravel packages (such as Eloquence) that allow for accessing
| Eloquent model properties via camel case, instead of snake case.
|
| Enabling this option will support these packages by saving all model
| properties as camel case, instead of snake case.
|
| For example, normally you would see this:
|
| * @property \Carbon\Carbon $created_at
| * @property \Carbon\Carbon $updated_at
|
| With this enabled, the properties will be this:
|
| * @property \Carbon\Carbon $createdAt
| * @property \Carbon\Carbon $updatedAt
|
| Note, it is currently an all-or-nothing option.
|
*/
'model_camel_case_properties' => false,
/*
|--------------------------------------------------------------------------
| Property Casts
|--------------------------------------------------------------------------
|
| Cast the given "real type" to the given "type".
|
*/
'type_overrides' => [
'integer' => 'int',
'boolean' => 'bool',
],
];

104
code/config/logging.php Executable file
View File

@ -0,0 +1,104 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

View File

@ -4,45 +4,73 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Mail Driver | Default Mailer
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Laravel supports both SMTP and PHP's "mail" function as drivers for the | This option controls the default mailer that is used to send any email
| sending of e-mail. You may specify which one you're using throughout | messages sent by your application. Alternative mailers may be setup
| your application here. By default, Laravel is setup for SMTP mail. | and used as needed; however, this mailer will be used by default.
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "log", "array"
| |
*/ */
'driver' => env('MAIL_DRIVER', 'smtp'), 'default' => env('MAIL_MAILER', 'smtp'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| SMTP Host Address | Mailer Configurations
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you may provide the host address of the SMTP server used by your | Here you may configure all of the mailers used by your application plus
| applications. A default option is provided that is compatible with | their respective settings. Several examples have been configured for
| the Mailgun mail service which will provide reliable deliveries. | you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers to be used while
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| Supported: "smtp", "sendmail", "mailgun", "ses",
| "postmark", "log", "array"
| |
*/ */
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => null,
],
/* 'ses' => [
|-------------------------------------------------------------------------- 'transport' => 'ses',
| SMTP Host Port ],
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587), 'mailgun' => [
'transport' => 'mailgun',
],
'postmark' => [
'transport' => 'postmark',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -60,47 +88,6 @@ return [
'name' => env('MAIL_FROM_NAME', 'Example'), 'name' => env('MAIL_FROM_NAME', 'Example'),
], ],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Markdown Mail Settings | Markdown Mail Settings

View File

@ -4,18 +4,16 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Queue Driver | Default Queue Connection Name
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Laravel's queue API supports an assortment of back-ends via a single | Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same | API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver. | syntax for every one. Here you may define a default connection.
|
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
| |
*/ */
'default' => env('QUEUE_DRIVER', 'sync'), 'default' => env('QUEUE_CONNECTION', 'sync'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -26,6 +24,8 @@ return [
| is used by your application. A default configuration has been added | is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more. | for each back-end shipped with Laravel. You are free to add more.
| |
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/ */
'connections' => [ 'connections' => [
@ -46,22 +46,25 @@ return [
'host' => 'localhost', 'host' => 'localhost',
'queue' => 'default', 'queue' => 'default',
'retry_after' => 90, 'retry_after' => 90,
'block_for' => 0,
], ],
'sqs' => [ 'sqs' => [
'driver' => 'sqs', 'driver' => 'sqs',
'key' => 'your-public-key', 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => 'your-secret-key', 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => 'your-queue-name', 'queue' => env('SQS_QUEUE', 'your-queue-name'),
'region' => 'us-east-1', 'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
], ],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',
'queue' => 'default', 'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90, 'retry_after' => 90,
'block_for' => null,
], ],
], ],
@ -78,6 +81,7 @@ return [
*/ */
'failed' => [ 'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'), 'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs', 'table' => 'failed_jobs',
], ],

View File

@ -8,31 +8,26 @@ return [
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This file is for storing the credentials for third party services such | This file is for storing the credentials for third party services such
| as Stripe, Mailgun, SparkPost and others. This file provides a sane | as Mailgun, Postmark, AWS and more. This file provides the de facto
| default location for this type of information, allowing packages | location for this type of information, allowing packages to have
| to have a conventional place to find your various credentials. | a conventional file to locate the various service credentials.
| |
*/ */
'mailgun' => [ 'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'), 'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'), 'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
], ],
'ses' => [ 'ses' => [
'key' => env('SES_KEY'), 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('SES_SECRET'), 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => 'us-east-1', 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
], ],
]; ];

View File

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Str;
return [ return [
/* /*
@ -12,7 +14,7 @@ return [
| you may specify any of the other wonderful drivers provided here. | you may specify any of the other wonderful drivers provided here.
| |
| Supported: "file", "cookie", "database", "apc", | Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array" | "memcached", "redis", "dynamodb", "array"
| |
*/ */
@ -29,7 +31,7 @@ return [
| |
*/ */
'lifetime' => 120, 'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false, 'expire_on_close' => false,
@ -70,7 +72,7 @@ return [
| |
*/ */
'connection' => null, 'connection' => env('SESSION_CONNECTION', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -90,13 +92,15 @@ return [
| Session Cache Store | Session Cache Store
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| When using the "apc" or "memcached" session drivers, you may specify a | While using one of the framework's cache driven session backends you may
| cache store that should be used for these sessions. This value must | list a cache store that should be used for these sessions. This value
| correspond with one of the application's configured cache stores. | must match with one of the application's configured cache "stores".
|
| Affects: "apc", "dynamodb", "memcached", "redis"
| |
*/ */
'store' => null, 'store' => env('SESSION_STORE', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -122,7 +126,10 @@ return [
| |
*/ */
'cookie' => 'laravel_session', 'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -161,7 +168,7 @@ return [
| |
*/ */
'secure' => env('SESSION_SECURE_COOKIE', false), 'secure' => env('SESSION_SECURE_COOKIE'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -176,4 +183,19 @@ return [
'http_only' => true, 'http_only' => true,
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" since this is a secure default value.
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => 'lax',
]; ];

View File

@ -14,7 +14,7 @@ return [
*/ */
'paths' => [ 'paths' => [
realpath(base_path('resources/views')), resource_path('views'),
], ],
/* /*
@ -28,6 +28,9 @@ return [
| |
*/ */
'compiled' => realpath(storage_path('framework/views')), 'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),
]; ];

View File

@ -1 +1,2 @@
*.sqlite *.sqlite
*.sqlite-journal

View File

@ -1,24 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(App\User::class, function (Faker\Generator $faker) {
static $password;
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
];
});

View File

@ -0,0 +1,33 @@
<?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class UserFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = User::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->name,
'email' => $this->faker->unique()->safeEmail,
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
];
}
}

View File

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration class CreateUsersTable extends Migration
{ {
@ -14,9 +14,10 @@ class CreateUsersTable extends Migration
public function up() public function up()
{ {
Schema::create('users', function (Blueprint $table) { Schema::create('users', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->string('email')->unique(); $table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password'); $table->string('password');
$table->rememberToken(); $table->rememberToken();
$table->timestamps(); $table->timestamps();

View File

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePasswordResetsTable extends Migration class CreatePasswordResetsTable extends Migration
{ {
@ -15,7 +15,7 @@ class CreatePasswordResetsTable extends Migration
{ {
Schema::create('password_resets', function (Blueprint $table) { Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index(); $table->string('email')->index();
$table->string('token')->index(); $table->string('token');
$table->timestamp('created_at')->nullable(); $table->timestamp('created_at')->nullable();
}); });
} }

View File

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('failed_jobs');
}
}

View File

@ -1,16 +1,18 @@
<?php <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
{ {
/** /**
* Run the database seeds. * Seed the application's database.
* *
* @return void * @return void
*/ */
public function run() public function run()
{ {
// $this->call(UsersTableSeeder::class); // \App\Models\User::factory(10)->create();
} }
} }

22783
code/package-lock.json generated Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,19 @@
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "npm run development", "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", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --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": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll", "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", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production", "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" "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js"
}, },
"devDependencies": { "devDependencies": {
"axios": "^0.15.3", "axios": "^0.21",
"bootstrap-sass": "^3.3.7", "cross-env": "^7.0",
"cross-env": "^3.2.3", "laravel-mix": "^5.0.1",
"jquery": "^3.1.1", "lodash": "^4.17.19",
"laravel-mix": "^1.0", "resolve-url-loader": "^3.1.0"
"lodash": "^4.17.4", }
"vue": "^2.1.10"
}
} }

View File

@ -1,31 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupStaticAttributes="false" xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="bootstrap/autoload.php" bootstrap="vendor/autoload.php"
colors="true" colors="true"
convertErrorsToExceptions="true" >
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites> <testsuites>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
<testsuite name="Unit"> <testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory> <directory suffix="Test.php">./tests/Unit</directory>
</testsuite> </testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites> </testsuites>
<filter> <coverage processUncoveredFiles="true">
<whitelist processUncoveredFilesFromWhitelist="true"> <include>
<directory suffix=".php">./app</directory> <directory suffix=".php">./app</directory>
</whitelist> </include>
</filter> </coverage>
<php> <php>
<env name="APP_ENV" value="testing"/> <server name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/> <server name="BCRYPT_ROUNDS" value="4"/>
<env name="SESSION_DRIVER" value="array"/> <server name="CACHE_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/> <!-- <server name="DB_CONNECTION" value="sqlite"/> -->
<!-- <server name="DB_DATABASE" value=":memory:"/> -->
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
<server name="TELESCOPE_ENABLED" value="false"/>
</php> </php>
</phpunit> </phpunit>

View File

@ -1,20 +1,21 @@
<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
<IfModule mod_negotiation.c> <IfModule mod_negotiation.c>
Options -MultiViews Options -MultiViews -Indexes
</IfModule> </IfModule>
RewriteEngine On RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header # Handle Authorization Header
RewriteCond %{HTTP:Authorization} . RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule> </IfModule>

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,24 @@
<?php <?php
/** use Illuminate\Contracts\Http\Kernel;
* Laravel - A PHP Framework For Web Artisans use Illuminate\Http\Request;
*
* @package Laravel define('LARAVEL_START', microtime(true));
* @author Taylor Otwell <taylor@laravel.com>
*/ /*
|--------------------------------------------------------------------------
| Check If Application Is Under Maintenance
|--------------------------------------------------------------------------
|
| If the application is maintenance / demo mode via the "down" command we
| will require this file so that any prerendered template can be shown
| instead of starting the framework, which could cause an exception.
|
*/
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
require __DIR__.'/../storage/framework/maintenance.php';
}
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -13,47 +26,30 @@
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Composer provides a convenient, automatically generated class loader for | Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it | this application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual | into the script here so we don't need to manually load our classes.
| loading any of our classes later on. It feels nice to relax.
| |
*/ */
require __DIR__.'/../bootstrap/autoload.php'; require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Run The Application | Run The Application
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Once we have the application, we can handle the incoming request | Once we have the application, we can handle the incoming request using
| through the kernel, and send the associated response back to | the application's HTTP kernel. Then, we will send the response back
| the client's browser allowing them to enjoy the creative | to this client's browser, allowing them to enjoy our application.
| and wonderful application we have prepared for them.
| |
*/ */
/** @var \Illuminate\Contracts\Http\Kernel $kernel */ $app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle( $kernel = $app->make(Kernel::class);
$request = Illuminate\Http\Request::capture()
);
$response->send(); $response = tap($kernel->handle(
$request = Request::capture()
))->send();
$kernel->terminate($request, $response); $kernel->terminate($request, $response);

34
code/public/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,8 @@
<!--
Rewrites requires Microsoft URL Rewrite Module for IIS
Download: https://www.microsoft.com/en-us/download/details.aspx?id=47337
Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
-->
<configuration> <configuration>
<system.webServer> <system.webServer>
<rewrite> <rewrite>

View File

@ -1,24 +0,0 @@
# LaravelRUS Skeleton
[![Packagist Version](https://img.shields.io/packagist/v/laravelrus/skeleton.svg)](https://packagist.org/packages/laravelrus/skeleton)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://packagist.org/packages/laravelrus/skeleton)
[![Gitter Chat](https://img.shields.io/badge/Laravel-RUS-red.svg)](https://gitter.im/LaravelRUS/chat)
<p align="center">
<img src="https://avatars3.githubusercontent.com/u/5966874?v=3&s=200"><br><br>
<strong>Скелет приложения на базе Laravel 5.4 от сообщества LaravelRUS.</strong><br>
</p>
--
#### Изменения:
* режим ротации логов `daily` вместо `single`;
* закомментированны все алиасы фасадов.
#### Добавлено:
* type hints в разных местах;
* русские языковые файлы;
* базовая модель `App\Core\Model`, от которой можно наследовать свои модели;
* ключ `app.local_providers` для провайдеров, которые будут загружаться только в среде `local`;
* пакеты [barryvdh/laravel-debugbar](https://github.com/barryvdh/laravel-debugbar) и [barryvdh/laravel-ide-helper](https://github.com/barryvdh/laravel-ide-helper), подключаются в `app.local_providers`.

View File

@ -1,22 +0,0 @@
/**
* 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');
/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs.
*/
Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
el: '#app'
});

View File

@ -1,53 +0,0 @@
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.$ = window.jQuery = require('jquery');
require('bootstrap-sass');
} 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: 'your-pusher-key'
// });

View File

@ -1,23 +0,0 @@
<template>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Example Component</div>
<div class="panel-body">
I'm an example component!
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
mounted() {
console.log('Component mounted.')
}
}
</script>

View File

@ -1,38 +0,0 @@
// Body
$body-bg: #f5f8fa;
// Borders
$laravel-border-color: darken($body-bg, 10%);
$list-group-border: $laravel-border-color;
$navbar-default-border: $laravel-border-color;
$panel-default-border: $laravel-border-color;
$panel-inner-border: $laravel-border-color;
// Brands
$brand-primary: #3097D1;
$brand-info: #8eb4cb;
$brand-success: #2ab27b;
$brand-warning: #cbb956;
$brand-danger: #bf5329;
// Typography
$icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
$font-family-sans-serif: "Raleway", sans-serif;
$font-size-base: 14px;
$line-height-base: 1.6;
$text-color: #636b6f;
// Navbar
$navbar-default-bg: #fff;
// Buttons
$btn-default-color: $text-color;
// Inputs
$input-border: lighten($text-color, 40%);
$input-border-focus: lighten($brand-primary, 25%);
$input-color-placeholder: lighten($text-color, 30%);
// Panels
$panel-default-heading-bg: #fff;

View File

@ -1,9 +0,0 @@
// Fonts
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
// Variables
@import "variables";
// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

0
code/resources/css/app.css vendored Executable file
View File

1
code/resources/js/app.js vendored Executable file
View File

@ -0,0 +1 @@
require('./bootstrap');

28
code/resources/js/bootstrap.js vendored Executable file
View File

@ -0,0 +1,28 @@
window._ = require('lodash');
/**
* 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';
/**
* 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,
// forceTLS: true
// });

View File

@ -14,6 +14,7 @@ return [
*/ */
'failed' => 'These credentials do not match our records.', 'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
]; ];

View File

@ -13,10 +13,10 @@ return [
| |
*/ */
'password' => 'Passwords must be at least six characters and match the confirmation.',
'reset' => 'Your password has been reset!', 'reset' => 'Your password has been reset!',
'sent' => 'We have e-mailed your password reset link!', 'sent' => 'We have emailed your password reset link!',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.', 'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that e-mail address.", 'user' => "We can't find a user with that email address.",
]; ];

View File

@ -13,80 +13,111 @@ return [
| |
*/ */
'accepted' => 'The :attribute must be accepted.', 'accepted' => 'The :attribute must be accepted.',
'active_url' => 'The :attribute is not a valid URL.', 'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.', 'after' => 'The :attribute must be a date after :date.',
'after_or_equal' => 'The :attribute must be a date after or equal to :date.', 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
'alpha' => 'The :attribute may only contain letters.', 'alpha' => 'The :attribute may only contain letters.',
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute may only contain letters and numbers.', 'alpha_num' => 'The :attribute may only contain letters and numbers.',
'array' => 'The :attribute must be an array.', 'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.', 'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [ 'between' => [
'numeric' => 'The :attribute must be between :min and :max.', 'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.', 'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.', 'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.', 'array' => 'The :attribute must have between :min and :max items.',
], ],
'boolean' => 'The :attribute field must be true or false.', 'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.', 'confirmed' => 'The :attribute confirmation does not match.',
'date' => 'The :attribute is not a valid date.', 'date' => 'The :attribute is not a valid date.',
'date_format' => 'The :attribute does not match the format :format.', 'date_equals' => 'The :attribute must be a date equal to :date.',
'different' => 'The :attribute and :other must be different.', 'date_format' => 'The :attribute does not match the format :format.',
'digits' => 'The :attribute must be :digits digits.', 'different' => 'The :attribute and :other must be different.',
'digits_between' => 'The :attribute must be between :min and :max digits.', 'digits' => 'The :attribute must be :digits digits.',
'dimensions' => 'The :attribute has invalid image dimensions.', 'digits_between' => 'The :attribute must be between :min and :max digits.',
'distinct' => 'The :attribute field has a duplicate value.', 'dimensions' => 'The :attribute has invalid image dimensions.',
'email' => 'The :attribute must be a valid email address.', 'distinct' => 'The :attribute field has a duplicate value.',
'exists' => 'The selected :attribute is invalid.', 'email' => 'The :attribute must be a valid email address.',
'file' => 'The :attribute must be a file.', 'ends_with' => 'The :attribute must end with one of the following: :values.',
'filled' => 'The :attribute field must have a value.', 'exists' => 'The selected :attribute is invalid.',
'image' => 'The :attribute must be an image.', 'file' => 'The :attribute must be a file.',
'in' => 'The selected :attribute is invalid.', 'filled' => 'The :attribute field must have a value.',
'in_array' => 'The :attribute field does not exist in :other.', 'gt' => [
'integer' => 'The :attribute must be an integer.', 'numeric' => 'The :attribute must be greater than :value.',
'ip' => 'The :attribute must be a valid IP address.', 'file' => 'The :attribute must be greater than :value kilobytes.',
'ipv4' => 'The :attribute must be a valid IPv4 address.', 'string' => 'The :attribute must be greater than :value characters.',
'ipv6' => 'The :attribute must be a valid IPv6 address.', 'array' => 'The :attribute must have more than :value items.',
'json' => 'The :attribute must be a valid JSON string.', ],
'max' => [ 'gte' => [
'numeric' => 'The :attribute must be greater than or equal :value.',
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
'string' => 'The :attribute must be greater than or equal :value characters.',
'array' => 'The :attribute must have :value items or more.',
],
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'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.',
'lt' => [
'numeric' => 'The :attribute must be less than :value.',
'file' => 'The :attribute must be less than :value kilobytes.',
'string' => 'The :attribute must be less than :value characters.',
'array' => 'The :attribute must have less than :value items.',
],
'lte' => [
'numeric' => 'The :attribute must be less than or equal :value.',
'file' => 'The :attribute must be less than or equal :value kilobytes.',
'string' => 'The :attribute must be less than or equal :value characters.',
'array' => 'The :attribute must not have more than :value items.',
],
'max' => [
'numeric' => 'The :attribute may not be greater than :max.', 'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.', 'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.', 'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.', 'array' => 'The :attribute may not have more than :max items.',
], ],
'mimes' => 'The :attribute must be a file of type: :values.', 'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.', 'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [ 'min' => [
'numeric' => 'The :attribute must be at least :min.', 'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.', 'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.', 'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.', 'array' => 'The :attribute must have at least :min items.',
], ],
'not_in' => 'The selected :attribute is invalid.', 'multiple_of' => 'The :attribute must be a multiple of :value',
'numeric' => 'The :attribute must be a number.', 'not_in' => 'The selected :attribute is invalid.',
'present' => 'The :attribute field must be present.', 'not_regex' => 'The :attribute format is invalid.',
'regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.',
'required' => 'The :attribute field is required.', 'password' => 'The password is incorrect.',
'required_if' => 'The :attribute field is required when :other is :value.', 'present' => 'The :attribute field must be present.',
'required_unless' => 'The :attribute field is required unless :other is in :values.', 'regex' => 'The :attribute format is invalid.',
'required_with' => 'The :attribute field is required when :values is present.', 'required' => 'The :attribute field is required.',
'required_with_all' => 'The :attribute field is required when :values is present.', 'required_if' => 'The :attribute field is required when :other is :value.',
'required_without' => 'The :attribute field is required when :values is not present.', 'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.', 'same' => 'The :attribute and :other must match.',
'size' => [ 'size' => [
'numeric' => 'The :attribute must be :size.', 'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.', 'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.', 'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.', 'array' => 'The :attribute must contain :size items.',
], ],
'string' => 'The :attribute must be a string.', 'starts_with' => 'The :attribute must start with one of the following: :values.',
'timezone' => 'The :attribute must be a valid zone.', 'string' => 'The :attribute must be a string.',
'unique' => 'The :attribute has already been taken.', 'timezone' => 'The :attribute must be a valid zone.',
'uploaded' => 'The :attribute failed to upload.', 'unique' => 'The :attribute has already been taken.',
'url' => 'The :attribute format is invalid.', 'uploaded' => 'The :attribute failed to upload.',
'url' => 'The :attribute format is invalid.',
'uuid' => 'The :attribute must be a valid UUID.',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -110,9 +141,9 @@ return [
| Custom Validation Attributes | Custom Validation Attributes
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The following language lines are used to swap attribute place-holders | The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as E-Mail Address instead | with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make messages a little cleaner. | of "email". This simply helps us make our message more expressive.
| |
*/ */

View File

@ -1,19 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'Имя пользователя и пароль не совпадают.',
'throttle' => 'Слишком много попыток входа. Пожалуйста, попробуйте еще раз через :seconds секунд.',
];

View File

@ -1,19 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Языковые ресурсы постраничного вывода
|--------------------------------------------------------------------------
|
| Последующие языковые строки используются библиотекой постраничного вывода
| для создания простых ссылок на страницы. Вы можете поменять их на любые
| другие, которые лучше подходят для вашего приложения.
|
*/
'previous' => '&laquo; Назад',
'next' => 'Вперёд &raquo;',
];

View File

@ -1,22 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Языковые ресурсы напоминания пароля
|--------------------------------------------------------------------------
|
| Последующие языковые строки возвращаются брокером паролей на неудачные
| попытки обновления пароля в таких случаях, как ошибочный код сброса
| пароля или неверный новый пароль.
|
*/
'password' => 'Пароль должен быть не менее шести символов и совпадать с подтверждением.',
'reset' => 'Ваш пароль был сброшен!',
'sent' => 'Ссылка на сброс пароля была отправлена!',
'token' => 'Ошибочный код сброса пароля.',
'user' => 'Не удалось найти пользователя с указанным электронным адресом.',
];

View File

@ -1,138 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Языковые ресурсы для проверки значений
|--------------------------------------------------------------------------
|
| Последующие языковые строки содержат сообщения по-умолчанию, используемые
| классом, проверяющим значения (валидатором). Некоторые из правил имеют
| несколько версий, например, size. Вы можете поменять их на любые
| другие, которые лучше подходят для вашего приложения.
|
*/
'accepted' => 'Вы должны принять :attribute.',
'active_url' => 'Поле :attribute содержит недействительный URL.',
'after' => 'В поле :attribute должна быть дата после :date.',
'after_or_equal' => 'В поле :attribute должна быть дата после или равная :date.',
'alpha' => 'Поле :attribute может содержать только буквы.',
'alpha_dash' => 'Поле :attribute может содержать только буквы, цифры и дефис.',
'alpha_num' => 'Поле :attribute может содержать только буквы и цифры.',
'array' => 'Поле :attribute должно быть массивом.',
'before' => 'В поле :attribute должна быть дата до :date.',
'before_or_equal' => 'В поле :attribute должна быть дата до или равная :date.',
'between' => [
'numeric' => 'Поле :attribute должно быть между :min и :max.',
'file' => 'Размер файла в поле :attribute должен быть между :min и :max Килобайт(а).',
'string' => 'Количество символов в поле :attribute должно быть между :min и :max.',
'array' => 'Количество элементов в поле :attribute должно быть между :min и :max.',
],
'boolean' => 'Поле :attribute должно иметь значение логического типа.', // калька 'истина' или 'ложь' звучала бы слишком неестественно
'confirmed' => 'Поле :attribute не совпадает с подтверждением.',
'date' => 'Поле :attribute не является датой.',
'date_format' => 'Поле :attribute не соответствует формату :format.',
'different' => 'Поля :attribute и :other должны различаться.',
'digits' => 'Длина цифрового поля :attribute должна быть :digits.',
'digits_between' => 'Длина цифрового поля :attribute должна быть между :min и :max.',
'dimensions' => 'Поле :attribute имеет недопустимые размеры изображения.',
'distinct' => 'Поле :attribute содержит повторяющееся значение.',
'email' => 'Поле :attribute должно быть действительным электронным адресом.',
'file' => 'Поле :attribute должно быть файлом.',
'filled' => 'Поле :attribute обязательно для заполнения.',
'exists' => 'Выбранное значение для :attribute некорректно.',
'image' => 'Поле :attribute должно быть изображением.',
'in' => 'Выбранное значение для :attribute ошибочно.',
'in_array' => 'Поле :attribute не существует в :other.',
'integer' => 'Поле :attribute должно быть целым числом.',
'ip' => 'Поле :attribute должно быть действительным IP-адресом.',
'ipv4' => 'Поле :attribute должно быть действительным IPv4-адресом.',
'ipv6' => 'Поле :attribute должно быть действительным IPv6-адресом.',
'json' => 'Поле :attribute должно быть JSON строкой.',
'max' => [
'numeric' => 'Поле :attribute не может быть более :max.',
'file' => 'Размер файла в поле :attribute не может быть более :max Килобайт(а).',
'string' => 'Количество символов в поле :attribute не может превышать :max.',
'array' => 'Количество элементов в поле :attribute не может превышать :max.',
],
'mimes' => 'Поле :attribute должно быть файлом одного из следующих типов: :values.',
'mimetypes' => 'Поле :attribute должно быть файлом одного из следующих типов: :values.',
'min' => [
'numeric' => 'Поле :attribute должно быть не менее :min.',
'file' => 'Размер файла в поле :attribute должен быть не менее :min Килобайт(а).',
'string' => 'Количество символов в поле :attribute должно быть не менее :min.',
'array' => 'Количество элементов в поле :attribute должно быть не менее :min.',
],
'not_in' => 'Выбранное значение для :attribute ошибочно.',
'numeric' => 'Поле :attribute должно быть числом.',
'present' => 'Поле :attribute должно присутствовать.',
'regex' => 'Поле :attribute имеет ошибочный формат.',
'required' => 'Поле :attribute обязательно для заполнения.',
'required_if' => 'Поле :attribute обязательно для заполнения, когда :other равно :value.',
'required_unless' => 'Поле :attribute обязательно для заполнения, когда :other не равно :values.',
'required_with' => 'Поле :attribute обязательно для заполнения, когда :values указано.',
'required_with_all' => 'Поле :attribute обязательно для заполнения, когда :values указано.',
'required_without' => 'Поле :attribute обязательно для заполнения, когда :values не указано.',
'required_without_all' => 'Поле :attribute обязательно для заполнения, когда ни одно из :values не указано.',
'same' => 'Значение :attribute должно совпадать с :other.',
'size' => [
'numeric' => 'Поле :attribute должно быть равным :size.',
'file' => 'Размер файла в поле :attribute должен быть равен :size Килобайт(а).',
'string' => 'Количество символов в поле :attribute должно быть равным :size.',
'array' => 'Количество элементов в поле :attribute должно быть равным :size.',
],
'string' => 'Поле :attribute должно быть строкой.',
'timezone' => 'Поле :attribute должно быть действительным часовым поясом.',
'unique' => 'Такое значение поля :attribute уже существует.',
'uploaded' => 'Загрузка поля :attribute не удалась.',
'url' => 'Поле :attribute имеет ошибочный формат.',
/*
|--------------------------------------------------------------------------
| Собственные языковые ресурсы для проверки значений
|--------------------------------------------------------------------------
|
| Здесь Вы можете указать собственные сообщения для атрибутов.
| Это позволяет легко указать свое сообщение для заданного правила атрибута.
|
| http://laravel.com/docs/5.1/validation#custom-error-messages
| Пример использования
|
| 'custom' => [
| 'email' => [
| 'required' => 'Нам необходимо знать Ваш электронный адрес!',
| ],
| ],
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Собственные названия атрибутов
|--------------------------------------------------------------------------
|
| Последующие строки используются для подмены программных имен элементов
| пользовательского интерфейса на удобочитаемые. Например, вместо имени
| поля "email" в сообщениях будет выводиться "электронный адрес".
|
| Пример использования
|
| 'attributes' => [
| 'email' => 'электронный адрес',
| ],
|
*/
'attributes' => [
//
],
];

View File

@ -1,19 +0,0 @@
<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="{{ $url }}" class="button button-{{ $color or 'blue' }}" target="_blank">{{ $slot }}</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@ -1,11 +0,0 @@
<tr>
<td>
<table class="footer" align="center" width="570" cellpadding="0" cellspacing="0">
<tr>
<td class="content-cell" align="center">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
</td>
</tr>

View File

@ -1,7 +0,0 @@
<tr>
<td class="header">
<a href="{{ $url }}">
{{ $slot }}
</a>
</td>
</tr>

View File

@ -1,54 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<style>
@media only screen and (max-width: 600px) {
.inner-body {
width: 100% !important;
}
.footer {
width: 100% !important;
}
}
@media only screen and (max-width: 500px) {
.button {
width: 100% !important;
}
}
</style>
<table class="wrapper" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table class="content" width="100%" cellpadding="0" cellspacing="0">
{{ $header or '' }}
<!-- Email Body -->
<tr>
<td class="body" width="100%" cellpadding="0" cellspacing="0">
<table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0">
<!-- Body content -->
<tr>
<td class="content-cell">
{{ Illuminate\Mail\Markdown::parse($slot) }}
{{ $subcopy or '' }}
</td>
</tr>
</table>
</td>
</tr>
{{ $footer or '' }}
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -1,27 +0,0 @@
@component('mail::layout')
{{-- Header --}}
@slot('header')
@component('mail::header', ['url' => config('app.url')])
{{ config('app.name') }}
@endcomponent
@endslot
{{-- Body --}}
{{ $slot }}
{{-- Subcopy --}}
@if (isset($subcopy))
@slot('subcopy')
@component('mail::subcopy')
{{ $subcopy }}
@endcomponent
@endslot
@endif
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
&copy; {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
@endcomponent
@endslot
@endcomponent

View File

@ -1,13 +0,0 @@
<table class="panel" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="panel-content">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="panel-item">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@ -1,7 +0,0 @@
<table class="promotion" align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>

View File

@ -1,13 +0,0 @@
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="{{ $url }}" class="button button-green" target="_blank">{{ $slot }}</a>
</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@ -1,7 +0,0 @@
<table class="subcopy" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>

View File

@ -1,3 +0,0 @@
<div class="table">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</div>

View File

@ -1,279 +0,0 @@
/* Base */
body, body *:not(html):not(style):not(br):not(tr):not(code) {
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
}
body {
background-color: #F2F4F6;
color: #74787E;
height: 100%;
line-height: 1.4;
margin: 0;
width: 100% !important;
-webkit-text-size-adjust: none;
}
p,
ul,
ol,
blockquote {
line-height: 1.4;
text-align: left;
}
a {
color: #3869D4;
}
a img {
border: none;
}
/* Typography */
h1 {
color: #2F3133;
font-size: 19px;
font-weight: bold;
margin-top: 0;
text-align: left;
}
h2 {
color: #2F3133;
font-size: 16px;
font-weight: bold;
margin-top: 0;
text-align: left;
}
h3 {
color: #2F3133;
font-size: 14px;
font-weight: bold;
margin-top: 0;
text-align: left;
}
p {
color: #74787E;
font-size: 16px;
line-height: 1.5em;
margin-top: 0;
text-align: left;
}
p.sub {
font-size: 12px;
}
img {
max-width: 100%;
}
/* Layout */
.wrapper {
background-color: #f5f8fa;
margin: 0;
padding: 0;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.content {
margin: 0;
padding: 0;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
/* Header */
.header {
padding: 25px 0;
text-align: center;
}
.header a {
color: #bbbfc3;
font-size: 19px;
font-weight: bold;
text-decoration: none;
text-shadow: 0 1px 0 white;
}
/* Body */
.body {
background-color: #FFFFFF;
border-bottom: 1px solid #EDEFF2;
border-top: 1px solid #EDEFF2;
margin: 0;
padding: 0;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.inner-body {
background-color: #FFFFFF;
margin: 0 auto;
padding: 0;
width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 570px;
}
/* Subcopy */
.subcopy {
border-top: 1px solid #EDEFF2;
margin-top: 25px;
padding-top: 25px;
}
.subcopy p {
font-size: 12px;
}
/* Footer */
.footer {
margin: 0 auto;
padding: 0;
text-align: center;
width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 570px;
}
.footer p {
color: #AEAEAE;
font-size: 12px;
text-align: center;
}
/* Tables */
.table table {
margin: 30px auto;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.table th {
border-bottom: 1px solid #EDEFF2;
padding-bottom: 8px;
}
.table td {
color: #74787E;
font-size: 15px;
line-height: 18px;
padding: 10px 0;
}
.content-cell {
padding: 35px;
}
/* Buttons */
.action {
margin: 30px auto;
padding: 0;
text-align: center;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.button {
border-radius: 3px;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
color: #FFF;
display: inline-block;
text-decoration: none;
-webkit-text-size-adjust: none;
}
.button-blue {
background-color: #3097D1;
border-top: 10px solid #3097D1;
border-right: 18px solid #3097D1;
border-bottom: 10px solid #3097D1;
border-left: 18px solid #3097D1;
}
.button-green {
background-color: #2ab27b;
border-top: 10px solid #2ab27b;
border-right: 18px solid #2ab27b;
border-bottom: 10px solid #2ab27b;
border-left: 18px solid #2ab27b;
}
.button-red {
background-color: #bf5329;
border-top: 10px solid #bf5329;
border-right: 18px solid #bf5329;
border-bottom: 10px solid #bf5329;
border-left: 18px solid #bf5329;
}
/* Panels */
.panel {
margin: 0 0 21px;
}
.panel-content {
background-color: #EDEFF2;
padding: 16px;
}
.panel-item {
padding: 0;
}
.panel-item p:last-of-type {
margin-bottom: 0;
padding-bottom: 0;
}
/* Promotions */
.promotion {
background-color: #FFFFFF;
border: 2px dashed #9BA2AB;
margin: 0;
margin-bottom: 25px;
margin-top: 25px;
padding: 24px;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.promotion h1 {
text-align: center;
}
.promotion p {
font-size: 15px;
text-align: center;
}

View File

@ -1 +0,0 @@
{{ $slot }}: {{ $url }}

View File

@ -1 +0,0 @@
{{ $slot }}

View File

@ -1 +0,0 @@
[{{ $slot }}]({{ $url }})

View File

@ -1,9 +0,0 @@
{!! strip_tags($header) !!}
{!! strip_tags($slot) !!}
@if (isset($subcopy))
{!! strip_tags($subcopy) !!}
@endif
{!! strip_tags($footer) !!}

View File

@ -1,27 +0,0 @@
@component('mail::layout')
{{-- Header --}}
@slot('header')
@component('mail::header', ['url' => config('app.url')])
{{ config('app.name') }}
@endcomponent
@endslot
{{-- Body --}}
{{ $slot }}
{{-- Subcopy --}}
@if (isset($subcopy))
@slot('subcopy')
@component('mail::subcopy')
{{ $subcopy }}
@endcomponent
@endslot
@endif
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
@endcomponent
@endslot
@endcomponent

Some files were not shown because too many files have changed in this diff Show More