-
This commit is contained in:
commit
3a4a328d80
227
.gitignore
vendored
Executable file
227
.gitignore
vendored
Executable file
@ -0,0 +1,227 @@
|
|||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/macos,symfony,phpunit,phpstorm
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,symfony,phpunit,phpstorm
|
||||||
|
|
||||||
|
### 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
|
||||||
|
|
||||||
|
data/*.mp4
|
||||||
|
data/*.jpg
|
||||||
|
data/*.log
|
||||||
|
|
||||||
|
### macOS Patch ###
|
||||||
|
# iCloud generated files
|
||||||
|
*.icloud
|
||||||
|
|
||||||
|
### 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
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# AWS User-specific
|
||||||
|
.idea/**/aws.xml
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
data/data.db
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# SonarLint plugin
|
||||||
|
.idea/sonarlint/
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
### 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
|
||||||
|
|
||||||
|
# Azure Toolkit for IntelliJ plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
|
||||||
|
.idea/**/azureSettings.xml
|
||||||
|
|
||||||
|
### PHPUnit ###
|
||||||
|
# Covers PHPUnit
|
||||||
|
# Reference: https://phpunit.de/
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.phpunit.result.cache
|
||||||
|
.phpunit.cache
|
||||||
|
|
||||||
|
# PHPUnit
|
||||||
|
/app/phpunit.xml
|
||||||
|
/phpunit.xml
|
||||||
|
|
||||||
|
# Build data
|
||||||
|
/build/
|
||||||
|
|
||||||
|
### Symfony ###
|
||||||
|
# Cache and logs (Symfony2)
|
||||||
|
/app/cache/*
|
||||||
|
/app/logs/*
|
||||||
|
!app/cache/.gitkeep
|
||||||
|
!app/logs/.gitkeep
|
||||||
|
|
||||||
|
# Email spool folder
|
||||||
|
/app/spool/*
|
||||||
|
|
||||||
|
# Cache, session files and logs (Symfony3)
|
||||||
|
/var/cache/*
|
||||||
|
/var/logs/*
|
||||||
|
/var/sessions/*
|
||||||
|
!var/cache/.gitkeep
|
||||||
|
!var/logs/.gitkeep
|
||||||
|
!var/sessions/.gitkeep
|
||||||
|
|
||||||
|
# Logs (Symfony4)
|
||||||
|
/var/log/*
|
||||||
|
!var/log/.gitkeep
|
||||||
|
|
||||||
|
# Parameters
|
||||||
|
/app/config/parameters.yml
|
||||||
|
/app/config/parameters.ini
|
||||||
|
|
||||||
|
# Managed by Composer
|
||||||
|
/app/bootstrap.php.cache
|
||||||
|
/var/bootstrap.php.cache
|
||||||
|
/bin/*
|
||||||
|
!bin/console
|
||||||
|
!bin/symfony_requirements
|
||||||
|
/vendor/
|
||||||
|
/app/vendor/
|
||||||
|
|
||||||
|
# Assets and user uploads
|
||||||
|
/web/bundles/
|
||||||
|
/web/uploads/
|
||||||
|
|
||||||
|
# PHPUnit
|
||||||
|
|
||||||
|
# Build data
|
||||||
|
|
||||||
|
# Composer PHAR
|
||||||
|
/composer.phar
|
||||||
|
|
||||||
|
# Backup entities generated with doctrine:generate:entities command
|
||||||
|
**/Entity/*~
|
||||||
|
|
||||||
|
# Embedded web-server pid file
|
||||||
|
/.web-server-pid
|
||||||
|
|
||||||
|
### Symfony Patch ###
|
||||||
|
/web/css/
|
||||||
|
/web/js/
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/macos,symfony,phpunit,phpstorm
|
||||||
38
Dockerfile
Executable file
38
Dockerfile
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
FROM php:8.2.4-fpm
|
||||||
|
|
||||||
|
EXPOSE 9000
|
||||||
|
WORKDIR /var/www
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
less \
|
||||||
|
vim \
|
||||||
|
git \
|
||||||
|
libpq-dev \
|
||||||
|
nginx
|
||||||
|
|
||||||
|
RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
|
||||||
|
RUN rm -f /usr/local/etc/php/php.ini-development
|
||||||
|
RUN rm /etc/apt/preferences.d/no-debian-php
|
||||||
|
|
||||||
|
RUN docker-php-ext-install \
|
||||||
|
pdo_pgsql \
|
||||||
|
pgsql
|
||||||
|
|
||||||
|
RUN pecl install xdebug
|
||||||
|
RUN docker-php-ext-enable xdebug
|
||||||
|
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
|
# Configure Xdebug
|
||||||
|
COPY docker/php/php.ini /usr/local/etc/php/
|
||||||
|
COPY docker/php/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
|
|
||||||
|
COPY start.sh /home/start.sh
|
||||||
|
|
||||||
|
#nginx
|
||||||
|
ADD docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
CMD ["/bin/bash","/home/start.sh"]
|
||||||
4
code/.gitattributes
vendored
Executable file
4
code/.gitattributes
vendored
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
* text=auto
|
||||||
|
*.css linguist-vendored
|
||||||
|
*.scss linguist-vendored
|
||||||
|
*.js linguist-vendored
|
||||||
10
code/.gitignore
vendored
Executable file
10
code/.gitignore
vendored
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
/node_modules
|
||||||
|
/public/hot
|
||||||
|
/public/storage
|
||||||
|
/storage/*.key
|
||||||
|
/vendor
|
||||||
|
/.idea
|
||||||
|
/.vagrant
|
||||||
|
Homestead.json
|
||||||
|
Homestead.yaml
|
||||||
|
.env
|
||||||
46
code/app/Console/Commands/IdeHelperRun.php
Executable file
46
code/app/Console/Commands/IdeHelperRun.php
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
<?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');
|
||||||
|
}
|
||||||
|
}
|
||||||
39
code/app/Console/Kernel.php
Executable file
39
code/app/Console/Kernel.php
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console;
|
||||||
|
|
||||||
|
use Illuminate\Console\Scheduling\Schedule;
|
||||||
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||||
|
|
||||||
|
class Kernel extends ConsoleKernel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The Artisan commands provided by your application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $commands = [
|
||||||
|
Commands\IdeHelperRun::class
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the application's command schedule.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function schedule(Schedule $schedule)
|
||||||
|
{
|
||||||
|
// $schedule->command('inspire')->hourly();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the Closure based commands for the application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function commands()
|
||||||
|
{
|
||||||
|
require base_path('routes/console.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
16
code/app/Core/Eloquent/Model.php
Executable file
16
code/app/Core/Eloquent/Model.php
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
<?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();
|
||||||
|
}
|
||||||
|
}
|
||||||
65
code/app/Exceptions/Handler.php
Executable file
65
code/app/Exceptions/Handler.php
Executable file
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exceptions;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use Illuminate\Auth\AuthenticationException;
|
||||||
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
|
|
||||||
|
class Handler extends ExceptionHandler
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A list of the exception types that should not be reported.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
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.
|
||||||
|
*
|
||||||
|
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||||
|
*
|
||||||
|
* @param \Exception $exception
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function report(Exception $exception)
|
||||||
|
{
|
||||||
|
parent::report($exception);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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'));
|
||||||
|
}
|
||||||
|
}
|
||||||
30
code/app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file
30
code/app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
<?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');
|
||||||
|
}
|
||||||
|
}
|
||||||
37
code/app/Http/Controllers/Auth/LoginController.php
Executable file
37
code/app/Http/Controllers/Auth/LoginController.php
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
<?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');
|
||||||
|
}
|
||||||
|
}
|
||||||
68
code/app/Http/Controllers/Auth/RegisterController.php
Executable file
68
code/app/Http/Controllers/Auth/RegisterController.php
Executable file
@ -0,0 +1,68 @@
|
|||||||
|
<?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']),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
37
code/app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
37
code/app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
<?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');
|
||||||
|
}
|
||||||
|
}
|
||||||
13
code/app/Http/Controllers/Controller.php
Executable file
13
code/app/Http/Controllers/Controller.php
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
class Controller extends BaseController
|
||||||
|
{
|
||||||
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||||
|
}
|
||||||
60
code/app/Http/Kernel.php
Executable file
60
code/app/Http/Kernel.php
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
|
|
||||||
|
class Kernel extends HttpKernel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The application's global HTTP middleware stack.
|
||||||
|
*
|
||||||
|
* These middleware are run during every request to your application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $middleware = [
|
||||||
|
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||||
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||||
|
\App\Http\Middleware\TrimStrings::class,
|
||||||
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application's route middleware groups.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $middlewareGroups = [
|
||||||
|
'web' => [
|
||||||
|
\App\Http\Middleware\EncryptCookies::class,
|
||||||
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||||
|
\Illuminate\Session\Middleware\StartSession::class,
|
||||||
|
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||||
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
'api' => [
|
||||||
|
'throttle:60,1',
|
||||||
|
'bindings',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application's route middleware.
|
||||||
|
*
|
||||||
|
* These middleware may be assigned to groups or used individually.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $routeMiddleware = [
|
||||||
|
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
||||||
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||||
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
17
code/app/Http/Middleware/EncryptCookies.php
Executable file
17
code/app/Http/Middleware/EncryptCookies.php
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
|
||||||
|
|
||||||
|
class EncryptCookies extends BaseEncrypter
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The names of the cookies that should not be encrypted.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
26
code/app/Http/Middleware/RedirectIfAuthenticated.php
Executable file
26
code/app/Http/Middleware/RedirectIfAuthenticated.php
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
class RedirectIfAuthenticated
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @param string|null $guard
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next, $guard = null)
|
||||||
|
{
|
||||||
|
if (Auth::guard($guard)->check()) {
|
||||||
|
return redirect('/home');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
18
code/app/Http/Middleware/TrimStrings.php
Executable file
18
code/app/Http/Middleware/TrimStrings.php
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;
|
||||||
|
|
||||||
|
class TrimStrings extends BaseTrimmer
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The names of the attributes that should not be trimmed.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
'password',
|
||||||
|
'password_confirmation',
|
||||||
|
];
|
||||||
|
}
|
||||||
17
code/app/Http/Middleware/VerifyCsrfToken.php
Executable file
17
code/app/Http/Middleware/VerifyCsrfToken.php
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
|
||||||
|
|
||||||
|
class VerifyCsrfToken extends BaseVerifier
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The URIs that should be excluded from CSRF verification.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
38
code/app/Providers/AppServiceProvider.php
Executable file
38
code/app/Providers/AppServiceProvider.php
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class AppServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The application instance.
|
||||||
|
*
|
||||||
|
* @var \Illuminate\Foundation\Application
|
||||||
|
*/
|
||||||
|
protected $app;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
if ($this->app->isLocal()) {
|
||||||
|
$localProviders = config('app.local_providers', []);
|
||||||
|
array_map([$this->app, 'register'], $localProviders);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
29
code/app/Providers/AuthServiceProvider.php
Executable file
29
code/app/Providers/AuthServiceProvider.php
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class AuthServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The policy mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $policies = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any authentication / authorization services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
$this->registerPolicies();
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
21
code/app/Providers/BroadcastServiceProvider.php
Executable file
21
code/app/Providers/BroadcastServiceProvider.php
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
|
|
||||||
|
class BroadcastServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
Broadcast::routes();
|
||||||
|
|
||||||
|
require base_path('routes/channels.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
32
code/app/Providers/EventServiceProvider.php
Executable file
32
code/app/Providers/EventServiceProvider.php
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Event;
|
||||||
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class EventServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The event listener mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $listen = [
|
||||||
|
'App\Events\Event' => [
|
||||||
|
'App\Listeners\EventListener',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any events for your application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
73
code/app/Providers/RouteServiceProvider.php
Executable file
73
code/app/Providers/RouteServiceProvider.php
Executable file
@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class RouteServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This namespace is applied to your controller routes.
|
||||||
|
*
|
||||||
|
* In addition, it is set as the URL generator's root namespace.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $namespace = 'App\Http\Controllers';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define your route model bindings, pattern filters, etc.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
|
||||||
|
parent::boot();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the routes for the application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function map()
|
||||||
|
{
|
||||||
|
$this->mapApiRoutes();
|
||||||
|
|
||||||
|
$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'));
|
||||||
|
}
|
||||||
|
}
|
||||||
38
code/app/User.php
Executable file
38
code/app/User.php
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
<?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',
|
||||||
|
];
|
||||||
|
}
|
||||||
51
code/artisan
Executable file
51
code/artisan
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The 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 that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/bootstrap/autoload.php';
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Artisan Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When we run the console application, the current CLI command will be
|
||||||
|
| executed in this console and the response sent back to a terminal
|
||||||
|
| or another output device for the developers. Here goes nothing!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||||
|
|
||||||
|
$status = $kernel->handle(
|
||||||
|
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||||
|
new Symfony\Component\Console\Output\ConsoleOutput
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Shutdown The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once Artisan has finished running, we will fire off the shutdown events
|
||||||
|
| so that any final work may be done by the application before we shut
|
||||||
|
| down the process. This is the last thing to happen to the request.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel->terminate($input, $status);
|
||||||
|
|
||||||
|
exit($status);
|
||||||
55
code/bootstrap/app.php
Executable file
55
code/bootstrap/app.php
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Create The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The first thing we will do is create a new Laravel application instance
|
||||||
|
| which serves as the "glue" for all the components of Laravel, and is
|
||||||
|
| the IoC container for the system binding all of the various parts.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = new Illuminate\Foundation\Application(
|
||||||
|
realpath(__DIR__.'/../')
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Bind Important Interfaces
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, we need to bind some important interfaces into the container so
|
||||||
|
| we will be able to resolve them when needed. The kernels serve the
|
||||||
|
| incoming requests to this application from both the web and CLI.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Http\Kernel::class,
|
||||||
|
App\Http\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Console\Kernel::class,
|
||||||
|
App\Console\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||||
|
App\Exceptions\Handler::class
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Return The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This script returns the application instance. The instance is given to
|
||||||
|
| the calling script so we can separate the building of the instances
|
||||||
|
| from the actual running of the application and sending responses.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
return $app;
|
||||||
17
code/bootstrap/autoload.php
Executable file
17
code/bootstrap/autoload.php
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
<?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';
|
||||||
2
code/bootstrap/cache/.gitignore
vendored
Executable file
2
code/bootstrap/cache/.gitignore
vendored
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
65
code/composer.json
Executable file
65
code/composer.json
Executable file
@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"name": "laravelrus/skeleton",
|
||||||
|
"description": "The Laravel Framework.",
|
||||||
|
"keywords": ["framework", "laravel", "laravelrus"],
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "project",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "JhaoDa",
|
||||||
|
"email": "jhaoda@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "atehnix",
|
||||||
|
"homepage": "https://vk.com/atehnix"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1",
|
||||||
|
"laravel/framework": "5.4.*",
|
||||||
|
"laravel/tinker": "~1.0",
|
||||||
|
"barryvdh/laravel-debugbar": "~2",
|
||||||
|
"barryvdh/laravel-ide-helper": "~2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"fzaninotto/faker": "~1.4",
|
||||||
|
"mockery/mockery": "0.9.*",
|
||||||
|
"phpunit/phpunit": "^8"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"database"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"post-root-package-install": [
|
||||||
|
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"php artisan key:generate"
|
||||||
|
],
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
4653
code/composer.lock
generated
Normal file
4653
code/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
236
code/config/app.php
Executable file
236
code/config/app.php
Executable file
@ -0,0 +1,236 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 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
|
||||||
|
| any other location as required by the application or its packages.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'name' => env('APP_NAME', 'Laravel'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Environment
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the "environment" your application is currently
|
||||||
|
| running in. This may determine how you prefer to configure various
|
||||||
|
| services your application utilizes. Set this in your ".env" file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Debug Mode
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When your application is in debug mode, detailed error messages with
|
||||||
|
| stack traces will be shown on every error that occurs within your
|
||||||
|
| application. If disabled, a simple generic error page is shown.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'debug' => env('APP_DEBUG', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This URL is used by the console to properly generate URLs when using
|
||||||
|
| the Artisan command line tool. You should set this to the root of
|
||||||
|
| your application so that it is used when running Artisan tasks.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default timezone for your application, which
|
||||||
|
| will be used by the PHP date and date-time functions. We have gone
|
||||||
|
| ahead and set this to a sensible default for you out of the box.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'Europe/Moscow',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Locale Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The application locale determines the default locale that will be used
|
||||||
|
| by the translation service provider. You are free to set this value
|
||||||
|
| to any of the locales which will be supported by the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'locale' => 'ru',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Fallback Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The fallback locale determines the locale to use when the current one
|
||||||
|
| is not available. You may change the value to correspond to any of
|
||||||
|
| the language folders that are provided through your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This key is used by the Illuminate encrypter service and should be set
|
||||||
|
| to a random, 32 character string, otherwise these encrypted strings
|
||||||
|
| will not be safe. Please do this before deploying an application!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
|
'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
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The service providers listed here will be automatically loaded on the
|
||||||
|
| request to your application. Feel free to add your own services to
|
||||||
|
| this array to grant expanded functionality to your applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Laravel Framework Service Providers...
|
||||||
|
*/
|
||||||
|
Illuminate\Auth\AuthServiceProvider::class,
|
||||||
|
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||||
|
Illuminate\Bus\BusServiceProvider::class,
|
||||||
|
Illuminate\Cache\CacheServiceProvider::class,
|
||||||
|
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||||
|
Illuminate\Cookie\CookieServiceProvider::class,
|
||||||
|
Illuminate\Database\DatabaseServiceProvider::class,
|
||||||
|
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||||
|
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||||
|
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||||
|
Illuminate\Hashing\HashServiceProvider::class,
|
||||||
|
Illuminate\Mail\MailServiceProvider::class,
|
||||||
|
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||||
|
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||||
|
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||||
|
Illuminate\Queue\QueueServiceProvider::class,
|
||||||
|
Illuminate\Redis\RedisServiceProvider::class,
|
||||||
|
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||||
|
Illuminate\Session\SessionServiceProvider::class,
|
||||||
|
Illuminate\Translation\TranslationServiceProvider::class,
|
||||||
|
Illuminate\Validation\ValidationServiceProvider::class,
|
||||||
|
Illuminate\View\ViewServiceProvider::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Package Service Providers...
|
||||||
|
*/
|
||||||
|
Laravel\Tinker\TinkerServiceProvider::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Application Service Providers...
|
||||||
|
*/
|
||||||
|
App\Providers\AppServiceProvider::class,
|
||||||
|
App\Providers\AuthServiceProvider::class,
|
||||||
|
// App\Providers\BroadcastServiceProvider::class,
|
||||||
|
App\Providers\EventServiceProvider::class,
|
||||||
|
App\Providers\RouteServiceProvider::class,
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
'local_providers' => [
|
||||||
|
Barryvdh\Debugbar\ServiceProvider::class,
|
||||||
|
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Aliases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This array of class aliases will be registered when this application
|
||||||
|
| is started. However, feel free to register as many as you wish as
|
||||||
|
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'aliases' => [
|
||||||
|
|
||||||
|
// 'App' => Illuminate\Support\Facades\App::class,
|
||||||
|
// 'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||||
|
// 'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||||
|
// 'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||||
|
// 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
|
||||||
|
// 'Bus' => Illuminate\Support\Facades\Bus::class,
|
||||||
|
// 'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||||
|
// 'Config' => Illuminate\Support\Facades\Config::class,
|
||||||
|
// 'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||||
|
// 'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||||
|
// 'DB' => Illuminate\Support\Facades\DB::class,
|
||||||
|
// 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||||
|
// 'Event' => Illuminate\Support\Facades\Event::class,
|
||||||
|
// 'File' => Illuminate\Support\Facades\File::class,
|
||||||
|
// 'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||||
|
// 'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||||
|
// 'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||||
|
// 'Log' => Illuminate\Support\Facades\Log::class,
|
||||||
|
// 'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||||
|
// 'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||||
|
// 'Password' => Illuminate\Support\Facades\Password::class,
|
||||||
|
// 'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||||
|
// 'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||||
|
// 'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||||
|
// 'Request' => Illuminate\Support\Facades\Request::class,
|
||||||
|
// 'Response' => Illuminate\Support\Facades\Response::class,
|
||||||
|
// 'Route' => Illuminate\Support\Facades\Route::class,
|
||||||
|
// 'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||||
|
// 'Session' => Illuminate\Support\Facades\Session::class,
|
||||||
|
// 'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||||
|
// 'URL' => Illuminate\Support\Facades\URL::class,
|
||||||
|
// 'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||||
|
// 'View' => Illuminate\Support\Facades\View::class,
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
102
code/config/auth.php
Executable file
102
code/config/auth.php
Executable file
@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Defaults
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default authentication "guard" and password
|
||||||
|
| reset options for your application. You may change these defaults
|
||||||
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'defaults' => [
|
||||||
|
'guard' => 'web',
|
||||||
|
'passwords' => 'users',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Guards
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, you may define every authentication guard for your application.
|
||||||
|
| Of course, a great default configuration has been defined for you
|
||||||
|
| here which uses session storage and the Eloquent user provider.
|
||||||
|
|
|
||||||
|
| All authentication drivers have a user provider. This defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| mechanisms used by this application to persist your user's data.
|
||||||
|
|
|
||||||
|
| Supported: "session", "token"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'guards' => [
|
||||||
|
'web' => [
|
||||||
|
'driver' => 'session',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
|
||||||
|
'api' => [
|
||||||
|
'driver' => 'token',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| All authentication drivers have a user provider. This defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| mechanisms used by this application to persist your user's data.
|
||||||
|
|
|
||||||
|
| If you have multiple user tables or models you may configure multiple
|
||||||
|
| sources which represent each model / table. These sources may then
|
||||||
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
||||||
|
| Supported: "database", "eloquent"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
'users' => [
|
||||||
|
'driver' => 'eloquent',
|
||||||
|
'model' => App\User::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
// 'users' => [
|
||||||
|
// 'driver' => 'database',
|
||||||
|
// 'table' => 'users',
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Resetting Passwords
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may specify multiple password reset configurations if you have more
|
||||||
|
| than one user table or model in the application and you want to have
|
||||||
|
| separate password reset settings based on the specific user types.
|
||||||
|
|
|
||||||
|
| The expire time is the number of minutes that the reset token should be
|
||||||
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'passwords' => [
|
||||||
|
'users' => [
|
||||||
|
'provider' => 'users',
|
||||||
|
'table' => 'password_resets',
|
||||||
|
'expire' => 60,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
58
code/config/broadcasting.php
Executable file
58
code/config/broadcasting.php
Executable file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Broadcaster
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default broadcaster that will be used by the
|
||||||
|
| framework when an event needs to be broadcast. You may set this to
|
||||||
|
| any of the connections defined in the "connections" array below.
|
||||||
|
|
|
||||||
|
| Supported: "pusher", "redis", "log", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Broadcast Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the broadcast connections that will be used
|
||||||
|
| to broadcast events to other systems or over websockets. Samples of
|
||||||
|
| each available type of connection are provided inside this array.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'pusher' => [
|
||||||
|
'driver' => 'pusher',
|
||||||
|
'key' => env('PUSHER_APP_KEY'),
|
||||||
|
'secret' => env('PUSHER_APP_SECRET'),
|
||||||
|
'app_id' => env('PUSHER_APP_ID'),
|
||||||
|
'options' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
],
|
||||||
|
|
||||||
|
'log' => [
|
||||||
|
'driver' => 'log',
|
||||||
|
],
|
||||||
|
|
||||||
|
'null' => [
|
||||||
|
'driver' => 'null',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
91
code/config/cache.php
Executable file
91
code/config/cache.php
Executable file
@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default cache connection that gets used while
|
||||||
|
| using this caching library. This connection is used when another is
|
||||||
|
| not explicitly specified when executing a given caching function.
|
||||||
|
|
|
||||||
|
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('CACHE_DRIVER', 'file'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Stores
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the cache "stores" for your application as
|
||||||
|
| well as their drivers. You may even define multiple stores for the
|
||||||
|
| same cache driver to group types of items stored in your caches.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'stores' => [
|
||||||
|
|
||||||
|
'apc' => [
|
||||||
|
'driver' => 'apc',
|
||||||
|
],
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'driver' => 'array',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'table' => 'cache',
|
||||||
|
'connection' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'file' => [
|
||||||
|
'driver' => 'file',
|
||||||
|
'path' => storage_path('framework/cache/data'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'memcached' => [
|
||||||
|
'driver' => 'memcached',
|
||||||
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||||
|
'sasl' => [
|
||||||
|
env('MEMCACHED_USERNAME'),
|
||||||
|
env('MEMCACHED_PASSWORD'),
|
||||||
|
],
|
||||||
|
'options' => [
|
||||||
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||||
|
],
|
||||||
|
'servers' => [
|
||||||
|
[
|
||||||
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MEMCACHED_PORT', 11211),
|
||||||
|
'weight' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Key Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||||
|
| be other applications utilizing the same cache. So, we'll specify a
|
||||||
|
| value to get prefixed to all our keys so we can avoid collisions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'prefix' => 'laravel',
|
||||||
|
|
||||||
|
];
|
||||||
120
code/config/database.php
Executable file
120
code/config/database.php
Executable file
@ -0,0 +1,120 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Database Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which of the database connections below you wish
|
||||||
|
| to use as your default connection for all database work. Of course
|
||||||
|
| you may use many connections at once using the Database library.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here are each of the database connections setup for your application.
|
||||||
|
| Of course, examples of configuring each database platform that is
|
||||||
|
| supported by Laravel is shown below to make development simple.
|
||||||
|
|
|
||||||
|
|
|
||||||
|
| All database work in Laravel is done through the PHP PDO facilities
|
||||||
|
| so make sure you have the driver for your particular database of
|
||||||
|
| choice installed on your machine before you begin development.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sqlite' => [
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
|
'prefix' => '',
|
||||||
|
],
|
||||||
|
|
||||||
|
'mysql' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => 'utf8mb4',
|
||||||
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
|
'prefix' => '',
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'pgsql' => [
|
||||||
|
'driver' => 'pgsql',
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '5432'),
|
||||||
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
'schema' => 'public',
|
||||||
|
'sslmode' => 'prefer',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqlsrv' => [
|
||||||
|
'driver' => 'sqlsrv',
|
||||||
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
|
'port' => env('DB_PORT', '1433'),
|
||||||
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Repository Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This table keeps track of all the migrations that have already run for
|
||||||
|
| your application. Using this information, we can determine which of
|
||||||
|
| the migrations on disk haven't actually been run in the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'migrations' => 'migrations',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Redis Databases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 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
|
||||||
|
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
|
||||||
|
'client' => 'predis',
|
||||||
|
|
||||||
|
'default' => [
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
|
'port' => env('REDIS_PORT', 6379),
|
||||||
|
'database' => 0,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
170
code/config/debugbar.php
Executable file
170
code/config/debugbar.php
Executable file
@ -0,0 +1,170 @@
|
|||||||
|
<?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',
|
||||||
|
|
||||||
|
];
|
||||||
68
code/config/filesystems.php
Executable file
68
code/config/filesystems.php
Executable file
@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default filesystem disk that should be used
|
||||||
|
| by the framework. The "local" disk, as well as a variety of cloud
|
||||||
|
| based disks are available to your application. Just store away!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('FILESYSTEM_DRIVER', 'local'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cloud Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Many applications store files both locally and in the cloud. For this
|
||||||
|
| reason, you may specify a default "cloud" driver here. This driver
|
||||||
|
| will be bound as the Cloud disk implementation in the container.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Filesystem Disks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||||
|
| may even configure multiple disks of the same driver. Defaults have
|
||||||
|
| been setup for each driver as an example of the required options.
|
||||||
|
|
|
||||||
|
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'disks' => [
|
||||||
|
|
||||||
|
'local' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'public' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/public'),
|
||||||
|
'url' => env('APP_URL').'/storage',
|
||||||
|
'visibility' => 'public',
|
||||||
|
],
|
||||||
|
|
||||||
|
's3' => [
|
||||||
|
'driver' => 's3',
|
||||||
|
'key' => env('AWS_KEY'),
|
||||||
|
'secret' => env('AWS_SECRET'),
|
||||||
|
'region' => env('AWS_REGION'),
|
||||||
|
'bucket' => env('AWS_BUCKET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
168
code/config/ide-helper.php
Executable file
168
code/config/ide-helper.php
Executable file
@ -0,0 +1,168 @@
|
|||||||
|
<?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',
|
||||||
|
],
|
||||||
|
];
|
||||||
123
code/config/mail.php
Executable file
123
code/config/mail.php
Executable file
@ -0,0 +1,123 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mail Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||||
|
| sending of e-mail. You may specify which one you're using throughout
|
||||||
|
| your application here. By default, Laravel is setup for SMTP mail.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
||||||
|
| "sparkpost", "log", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('MAIL_DRIVER', 'smtp'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may provide the host address of the SMTP server used by your
|
||||||
|
| applications. A default option is provided that is compatible with
|
||||||
|
| the Mailgun mail service which will provide reliable deliveries.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| 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),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all e-mails sent by your application to be sent from
|
||||||
|
| the same address. Here, you may specify a name and address that is
|
||||||
|
| used globally for all e-mails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
|
'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
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you are using Markdown based email rendering, you may configure your
|
||||||
|
| theme and component paths here, allowing you to customize the design
|
||||||
|
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'markdown' => [
|
||||||
|
'theme' => 'default',
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
resource_path('views/vendor/mail'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
85
code/config/queue.php
Executable file
85
code/config/queue.php
Executable file
@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Queue Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 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
|
||||||
|
| syntax for each one. Here you may set the default queue driver.
|
||||||
|
|
|
||||||
|
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('QUEUE_DRIVER', 'sync'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Queue Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the connection information for each server that
|
||||||
|
| is used by your application. A default configuration has been added
|
||||||
|
| for each back-end shipped with Laravel. You are free to add more.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sync' => [
|
||||||
|
'driver' => 'sync',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'table' => 'jobs',
|
||||||
|
'queue' => 'default',
|
||||||
|
'retry_after' => 90,
|
||||||
|
],
|
||||||
|
|
||||||
|
'beanstalkd' => [
|
||||||
|
'driver' => 'beanstalkd',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'queue' => 'default',
|
||||||
|
'retry_after' => 90,
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqs' => [
|
||||||
|
'driver' => 'sqs',
|
||||||
|
'key' => 'your-public-key',
|
||||||
|
'secret' => 'your-secret-key',
|
||||||
|
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
|
||||||
|
'queue' => 'your-queue-name',
|
||||||
|
'region' => 'us-east-1',
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
'queue' => 'default',
|
||||||
|
'retry_after' => 90,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Failed Queue Jobs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These options configure the behavior of failed queue job logging so you
|
||||||
|
| can control which database and table are used to store the jobs that
|
||||||
|
| have failed. You may change them to any database / table you wish.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => [
|
||||||
|
'database' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
'table' => 'failed_jobs',
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
38
code/config/services.php
Executable file
38
code/config/services.php
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Third Party Services
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This file is for storing the credentials for third party services such
|
||||||
|
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
|
||||||
|
| default location for this type of information, allowing packages
|
||||||
|
| to have a conventional place to find your various credentials.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mailgun' => [
|
||||||
|
'domain' => env('MAILGUN_DOMAIN'),
|
||||||
|
'secret' => env('MAILGUN_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'key' => env('SES_KEY'),
|
||||||
|
'secret' => env('SES_SECRET'),
|
||||||
|
'region' => 'us-east-1',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sparkpost' => [
|
||||||
|
'secret' => env('SPARKPOST_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'stripe' => [
|
||||||
|
'model' => App\User::class,
|
||||||
|
'key' => env('STRIPE_KEY'),
|
||||||
|
'secret' => env('STRIPE_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
179
code/config/session.php
Executable file
179
code/config/session.php
Executable file
@ -0,0 +1,179 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default session "driver" that will be used on
|
||||||
|
| requests. By default, we will use the lightweight native driver but
|
||||||
|
| you may specify any of the other wonderful drivers provided here.
|
||||||
|
|
|
||||||
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
|
| "memcached", "redis", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('SESSION_DRIVER', 'file'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Lifetime
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the number of minutes that you wish the session
|
||||||
|
| to be allowed to remain idle before it expires. If you want them
|
||||||
|
| to immediately expire on the browser closing, set that option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lifetime' => 120,
|
||||||
|
|
||||||
|
'expire_on_close' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Encryption
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to easily specify that all of your session data
|
||||||
|
| should be encrypted before it is stored. All encryption will be run
|
||||||
|
| automatically by Laravel and you can use the Session like normal.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encrypt' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session File Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the native session driver, we need a location where session
|
||||||
|
| files may be stored. A default has been set for you but a different
|
||||||
|
| location may be specified. This is only needed for file sessions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files' => storage_path('framework/sessions'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" or "redis" session drivers, you may specify a
|
||||||
|
| connection that should be used to manage these sessions. This should
|
||||||
|
| correspond to a connection in your database configuration options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" session driver, you may specify the table we
|
||||||
|
| should use to manage the sessions. Of course, a sensible default is
|
||||||
|
| provided for you; however, you are free to change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => 'sessions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "apc" or "memcached" session drivers, you may specify a
|
||||||
|
| cache store that should be used for these sessions. This value must
|
||||||
|
| correspond with one of the application's configured cache stores.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'store' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Sweeping Lottery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Some session drivers must manually sweep their storage location to get
|
||||||
|
| rid of old sessions from storage. Here are the chances that it will
|
||||||
|
| happen on a given request. By default, the odds are 2 out of 100.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lottery' => [2, 100],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the name of the cookie used to identify a session
|
||||||
|
| instance by ID. The name specified here will get used every time a
|
||||||
|
| new session cookie is created by the framework for every driver.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cookie' => 'laravel_session',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The session cookie path determines the path for which the cookie will
|
||||||
|
| be regarded as available. Typically, this will be the root path of
|
||||||
|
| your application but you are free to change this when necessary.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => '/',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the domain of the cookie used to identify a session
|
||||||
|
| in your application. This will determine which domains the cookie is
|
||||||
|
| available to in your application. A sensible default has been set.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => env('SESSION_DOMAIN', null),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTPS Only Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By setting this option to true, session cookies will only be sent back
|
||||||
|
| to the server if the browser has a HTTPS connection. This will keep
|
||||||
|
| the cookie from being sent to you if it can not be done securely.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'secure' => env('SESSION_SECURE_COOKIE', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTP Access Only
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will prevent JavaScript from accessing the
|
||||||
|
| value of the cookie and the cookie will only be accessible through
|
||||||
|
| the HTTP protocol. You are free to modify this option if needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'http_only' => true,
|
||||||
|
|
||||||
|
];
|
||||||
33
code/config/view.php
Executable file
33
code/config/view.php
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| View Storage Paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Most templating systems load templates from disk. Here you may specify
|
||||||
|
| an array of paths that should be checked for your views. Of course
|
||||||
|
| the usual Laravel view path has already been registered for you.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
realpath(base_path('resources/views')),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Compiled View Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines where all the compiled Blade templates will be
|
||||||
|
| stored for your application. Typically, this is within the storage
|
||||||
|
| directory. However, as usual, you are free to change this value.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'compiled' => realpath(storage_path('framework/views')),
|
||||||
|
|
||||||
|
];
|
||||||
1
code/database/.gitignore
vendored
Executable file
1
code/database/.gitignore
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
*.sqlite
|
||||||
24
code/database/factories/ModelFactory.php
Executable file
24
code/database/factories/ModelFactory.php
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
<?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),
|
||||||
|
];
|
||||||
|
});
|
||||||
35
code/database/migrations/2014_10_12_000000_create_users_table.php
Executable file
35
code/database/migrations/2014_10_12_000000_create_users_table.php
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateUsersTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('users', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('email')->unique();
|
||||||
|
$table->string('password');
|
||||||
|
$table->rememberToken();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('users');
|
||||||
|
}
|
||||||
|
}
|
||||||
32
code/database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
32
code/database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreatePasswordResetsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('password_resets', function (Blueprint $table) {
|
||||||
|
$table->string('email')->index();
|
||||||
|
$table->string('token')->index();
|
||||||
|
$table->timestamp('created_at')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('password_resets');
|
||||||
|
}
|
||||||
|
}
|
||||||
16
code/database/seeds/DatabaseSeeder.php
Executable file
16
code/database/seeds/DatabaseSeeder.php
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
// $this->call(UsersTableSeeder::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
21
code/package.json
Executable file
21
code/package.json
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev": "npm run development",
|
||||||
|
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||||
|
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||||
|
"watch-poll": "npm run watch -- --watch-poll",
|
||||||
|
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||||
|
"prod": "npm run production",
|
||||||
|
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"axios": "^0.15.3",
|
||||||
|
"bootstrap-sass": "^3.3.7",
|
||||||
|
"cross-env": "^3.2.3",
|
||||||
|
"jquery": "^3.1.1",
|
||||||
|
"laravel-mix": "^1.0",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"vue": "^2.1.10"
|
||||||
|
}
|
||||||
|
}
|
||||||
31
code/phpunit.xml
Executable file
31
code/phpunit.xml
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
bootstrap="bootstrap/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Feature">
|
||||||
|
<directory suffix="Test.php">./tests/Feature</directory>
|
||||||
|
</testsuite>
|
||||||
|
|
||||||
|
<testsuite name="Unit">
|
||||||
|
<directory suffix="Test.php">./tests/Unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<filter>
|
||||||
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
|
<directory suffix=".php">./app</directory>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
|
<env name="QUEUE_DRIVER" value="sync"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
20
code/public/.htaccess
Executable file
20
code/public/.htaccess
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
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
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
</IfModule>
|
||||||
5
code/public/css/app.css
vendored
Executable file
5
code/public/css/app.css
vendored
Executable file
File diff suppressed because one or more lines are too long
0
code/public/favicon.ico
Executable file
0
code/public/favicon.ico
Executable file
59
code/public/index.php
Executable file
59
code/public/index.php
Executable file
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Laravel - A PHP Framework For Web Artisans
|
||||||
|
*
|
||||||
|
* @package Laravel
|
||||||
|
* @author Taylor Otwell <taylor@laravel.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader for
|
||||||
|
| our 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
|
||||||
|
| loading any of our classes later on. It feels nice to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/../bootstrap/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
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once we have the application, we can handle the incoming request
|
||||||
|
| through the kernel, and send the associated response back to
|
||||||
|
| the client's browser allowing them to enjoy the creative
|
||||||
|
| and wonderful application we have prepared for them.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @var \Illuminate\Contracts\Http\Kernel $kernel */
|
||||||
|
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
||||||
|
|
||||||
|
$response = $kernel->handle(
|
||||||
|
$request = Illuminate\Http\Request::capture()
|
||||||
|
);
|
||||||
|
|
||||||
|
$response->send();
|
||||||
|
|
||||||
|
$kernel->terminate($request, $response);
|
||||||
34
code/public/js/app.js
vendored
Executable file
34
code/public/js/app.js
vendored
Executable file
File diff suppressed because one or more lines are too long
2
code/public/robots.txt
Executable file
2
code/public/robots.txt
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
23
code/public/web.config
Executable file
23
code/public/web.config
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="Imported Rule 1" stopProcessing="true">
|
||||||
|
<match url="^(.*)/$" ignoreCase="false" />
|
||||||
|
<conditions>
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
|
||||||
|
</rule>
|
||||||
|
<rule name="Imported Rule 2" stopProcessing="true">
|
||||||
|
<match url="^" ignoreCase="false" />
|
||||||
|
<conditions>
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="index.php" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
24
code/readme.md
Executable file
24
code/readme.md
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
# LaravelRUS Skeleton
|
||||||
|
[](https://packagist.org/packages/laravelrus/skeleton)
|
||||||
|
[](https://packagist.org/packages/laravelrus/skeleton)
|
||||||
|
[](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`.
|
||||||
22
code/resources/assets/js/app.js
vendored
Executable file
22
code/resources/assets/js/app.js
vendored
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* 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'
|
||||||
|
});
|
||||||
53
code/resources/assets/js/bootstrap.js
vendored
Executable file
53
code/resources/assets/js/bootstrap.js
vendored
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
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'
|
||||||
|
// });
|
||||||
23
code/resources/assets/js/components/Example.vue
Executable file
23
code/resources/assets/js/components/Example.vue
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
<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>
|
||||||
38
code/resources/assets/sass/_variables.scss
vendored
Executable file
38
code/resources/assets/sass/_variables.scss
vendored
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
// 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;
|
||||||
9
code/resources/assets/sass/app.scss
vendored
Executable file
9
code/resources/assets/sass/app.scss
vendored
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
// 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";
|
||||||
19
code/resources/lang/en/auth.php
Executable file
19
code/resources/lang/en/auth.php
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
<?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' => 'These credentials do not match our records.',
|
||||||
|
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||||
|
|
||||||
|
];
|
||||||
19
code/resources/lang/en/pagination.php
Executable file
19
code/resources/lang/en/pagination.php
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Pagination Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used by the paginator library to build
|
||||||
|
| the simple pagination links. You are free to change them to anything
|
||||||
|
| you want to customize your views to better match your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'previous' => '« Previous',
|
||||||
|
'next' => 'Next »',
|
||||||
|
|
||||||
|
];
|
||||||
22
code/resources/lang/en/passwords.php
Executable file
22
code/resources/lang/en/passwords.php
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are the default lines which match reasons
|
||||||
|
| that are given by the password broker for a password update attempt
|
||||||
|
| has failed, such as for an invalid token or invalid new password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password' => 'Passwords must be at least six characters and match the confirmation.',
|
||||||
|
'reset' => 'Your password has been reset!',
|
||||||
|
'sent' => 'We have e-mailed your password reset link!',
|
||||||
|
'token' => 'This password reset token is invalid.',
|
||||||
|
'user' => "We can't find a user with that e-mail address.",
|
||||||
|
|
||||||
|
];
|
||||||
121
code/resources/lang/en/validation.php
Executable file
121
code/resources/lang/en/validation.php
Executable file
@ -0,0 +1,121 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines contain the default error messages used by
|
||||||
|
| the validator class. Some of these rules have multiple versions such
|
||||||
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'accepted' => 'The :attribute must be accepted.',
|
||||||
|
'active_url' => 'The :attribute is not a valid URL.',
|
||||||
|
'after' => 'The :attribute must be a date after :date.',
|
||||||
|
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||||
|
'alpha' => 'The :attribute may only contain letters.',
|
||||||
|
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
|
||||||
|
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||||
|
'array' => 'The :attribute must be an array.',
|
||||||
|
'before' => 'The :attribute must be a date before :date.',
|
||||||
|
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||||
|
'between' => [
|
||||||
|
'numeric' => 'The :attribute must be between :min and :max.',
|
||||||
|
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||||
|
'string' => 'The :attribute must be between :min and :max characters.',
|
||||||
|
'array' => 'The :attribute must have between :min and :max items.',
|
||||||
|
],
|
||||||
|
'boolean' => 'The :attribute field must be true or false.',
|
||||||
|
'confirmed' => 'The :attribute confirmation does not match.',
|
||||||
|
'date' => 'The :attribute is not a valid date.',
|
||||||
|
'date_format' => 'The :attribute does not match the format :format.',
|
||||||
|
'different' => 'The :attribute and :other must be different.',
|
||||||
|
'digits' => 'The :attribute must be :digits digits.',
|
||||||
|
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||||
|
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||||
|
'distinct' => 'The :attribute field has a duplicate value.',
|
||||||
|
'email' => 'The :attribute must be a valid email address.',
|
||||||
|
'exists' => 'The selected :attribute is invalid.',
|
||||||
|
'file' => 'The :attribute must be a file.',
|
||||||
|
'filled' => 'The :attribute field must have a value.',
|
||||||
|
'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.',
|
||||||
|
'max' => [
|
||||||
|
'numeric' => 'The :attribute may not be greater than :max.',
|
||||||
|
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||||
|
'string' => 'The :attribute may not be greater than :max characters.',
|
||||||
|
'array' => 'The :attribute may not have more than :max items.',
|
||||||
|
],
|
||||||
|
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||||
|
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||||
|
'min' => [
|
||||||
|
'numeric' => 'The :attribute must be at least :min.',
|
||||||
|
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||||
|
'string' => 'The :attribute must be at least :min characters.',
|
||||||
|
'array' => 'The :attribute must have at least :min items.',
|
||||||
|
],
|
||||||
|
'not_in' => 'The selected :attribute is invalid.',
|
||||||
|
'numeric' => 'The :attribute must be a number.',
|
||||||
|
'present' => 'The :attribute field must be present.',
|
||||||
|
'regex' => 'The :attribute format is invalid.',
|
||||||
|
'required' => 'The :attribute field is required.',
|
||||||
|
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||||
|
'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 is 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.',
|
||||||
|
'same' => 'The :attribute and :other must match.',
|
||||||
|
'size' => [
|
||||||
|
'numeric' => 'The :attribute must be :size.',
|
||||||
|
'file' => 'The :attribute must be :size kilobytes.',
|
||||||
|
'string' => 'The :attribute must be :size characters.',
|
||||||
|
'array' => 'The :attribute must contain :size items.',
|
||||||
|
],
|
||||||
|
'string' => 'The :attribute must be a string.',
|
||||||
|
'timezone' => 'The :attribute must be a valid zone.',
|
||||||
|
'unique' => 'The :attribute has already been taken.',
|
||||||
|
'uploaded' => 'The :attribute failed to upload.',
|
||||||
|
'url' => 'The :attribute format is invalid.',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify custom validation messages for attributes using the
|
||||||
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'custom' => [
|
||||||
|
'attribute-name' => [
|
||||||
|
'rule-name' => 'custom-message',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used to swap attribute place-holders
|
||||||
|
| with something more reader friendly such as E-Mail Address instead
|
||||||
|
| of "email". This simply helps us make messages a little cleaner.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'attributes' => [],
|
||||||
|
|
||||||
|
];
|
||||||
19
code/resources/lang/ru/auth.php
Executable file
19
code/resources/lang/ru/auth.php
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
<?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 секунд.',
|
||||||
|
|
||||||
|
];
|
||||||
19
code/resources/lang/ru/pagination.php
Executable file
19
code/resources/lang/ru/pagination.php
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Языковые ресурсы постраничного вывода
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Последующие языковые строки используются библиотекой постраничного вывода
|
||||||
|
| для создания простых ссылок на страницы. Вы можете поменять их на любые
|
||||||
|
| другие, которые лучше подходят для вашего приложения.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'previous' => '« Назад',
|
||||||
|
'next' => 'Вперёд »',
|
||||||
|
|
||||||
|
];
|
||||||
22
code/resources/lang/ru/passwords.php
Executable file
22
code/resources/lang/ru/passwords.php
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Языковые ресурсы напоминания пароля
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Последующие языковые строки возвращаются брокером паролей на неудачные
|
||||||
|
| попытки обновления пароля в таких случаях, как ошибочный код сброса
|
||||||
|
| пароля или неверный новый пароль.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password' => 'Пароль должен быть не менее шести символов и совпадать с подтверждением.',
|
||||||
|
'reset' => 'Ваш пароль был сброшен!',
|
||||||
|
'sent' => 'Ссылка на сброс пароля была отправлена!',
|
||||||
|
'token' => 'Ошибочный код сброса пароля.',
|
||||||
|
'user' => 'Не удалось найти пользователя с указанным электронным адресом.',
|
||||||
|
|
||||||
|
];
|
||||||
138
code/resources/lang/ru/validation.php
Executable file
138
code/resources/lang/ru/validation.php
Executable file
@ -0,0 +1,138 @@
|
|||||||
|
<?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' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
19
code/resources/views/vendor/mail/html/button.blade.php
vendored
Executable file
19
code/resources/views/vendor/mail/html/button.blade.php
vendored
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
<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>
|
||||||
11
code/resources/views/vendor/mail/html/footer.blade.php
vendored
Executable file
11
code/resources/views/vendor/mail/html/footer.blade.php
vendored
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
<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>
|
||||||
7
code/resources/views/vendor/mail/html/header.blade.php
vendored
Executable file
7
code/resources/views/vendor/mail/html/header.blade.php
vendored
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
<tr>
|
||||||
|
<td class="header">
|
||||||
|
<a href="{{ $url }}">
|
||||||
|
{{ $slot }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
54
code/resources/views/vendor/mail/html/layout.blade.php
vendored
Executable file
54
code/resources/views/vendor/mail/html/layout.blade.php
vendored
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
<!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>
|
||||||
27
code/resources/views/vendor/mail/html/message.blade.php
vendored
Executable file
27
code/resources/views/vendor/mail/html/message.blade.php
vendored
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
@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
|
||||||
13
code/resources/views/vendor/mail/html/panel.blade.php
vendored
Executable file
13
code/resources/views/vendor/mail/html/panel.blade.php
vendored
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
<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>
|
||||||
7
code/resources/views/vendor/mail/html/promotion.blade.php
vendored
Executable file
7
code/resources/views/vendor/mail/html/promotion.blade.php
vendored
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
<table class="promotion" align="center" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
13
code/resources/views/vendor/mail/html/promotion/button.blade.php
vendored
Executable file
13
code/resources/views/vendor/mail/html/promotion/button.blade.php
vendored
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
<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>
|
||||||
7
code/resources/views/vendor/mail/html/subcopy.blade.php
vendored
Executable file
7
code/resources/views/vendor/mail/html/subcopy.blade.php
vendored
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
<table class="subcopy" width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
3
code/resources/views/vendor/mail/html/table.blade.php
vendored
Executable file
3
code/resources/views/vendor/mail/html/table.blade.php
vendored
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
<div class="table">
|
||||||
|
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||||
|
</div>
|
||||||
279
code/resources/views/vendor/mail/html/themes/default.css
vendored
Executable file
279
code/resources/views/vendor/mail/html/themes/default.css
vendored
Executable file
@ -0,0 +1,279 @@
|
|||||||
|
/* 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;
|
||||||
|
}
|
||||||
1
code/resources/views/vendor/mail/markdown/button.blade.php
vendored
Executable file
1
code/resources/views/vendor/mail/markdown/button.blade.php
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}: {{ $url }}
|
||||||
1
code/resources/views/vendor/mail/markdown/footer.blade.php
vendored
Executable file
1
code/resources/views/vendor/mail/markdown/footer.blade.php
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
1
code/resources/views/vendor/mail/markdown/header.blade.php
vendored
Executable file
1
code/resources/views/vendor/mail/markdown/header.blade.php
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
[{{ $slot }}]({{ $url }})
|
||||||
9
code/resources/views/vendor/mail/markdown/layout.blade.php
vendored
Executable file
9
code/resources/views/vendor/mail/markdown/layout.blade.php
vendored
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
{!! strip_tags($header) !!}
|
||||||
|
|
||||||
|
{!! strip_tags($slot) !!}
|
||||||
|
@if (isset($subcopy))
|
||||||
|
|
||||||
|
{!! strip_tags($subcopy) !!}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{!! strip_tags($footer) !!}
|
||||||
27
code/resources/views/vendor/mail/markdown/message.blade.php
vendored
Executable file
27
code/resources/views/vendor/mail/markdown/message.blade.php
vendored
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
@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
|
||||||
1
code/resources/views/vendor/mail/markdown/panel.blade.php
vendored
Executable file
1
code/resources/views/vendor/mail/markdown/panel.blade.php
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
1
code/resources/views/vendor/mail/markdown/promotion.blade.php
vendored
Executable file
1
code/resources/views/vendor/mail/markdown/promotion.blade.php
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
1
code/resources/views/vendor/mail/markdown/promotion/button.blade.php
vendored
Executable file
1
code/resources/views/vendor/mail/markdown/promotion/button.blade.php
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
[{{ $slot }}]({{ $url }})
|
||||||
1
code/resources/views/vendor/mail/markdown/subcopy.blade.php
vendored
Executable file
1
code/resources/views/vendor/mail/markdown/subcopy.blade.php
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
1
code/resources/views/vendor/mail/markdown/table.blade.php
vendored
Executable file
1
code/resources/views/vendor/mail/markdown/table.blade.php
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
{{ $slot }}
|
||||||
58
code/resources/views/vendor/notifications/email.blade.php
vendored
Executable file
58
code/resources/views/vendor/notifications/email.blade.php
vendored
Executable file
@ -0,0 +1,58 @@
|
|||||||
|
@component('mail::message')
|
||||||
|
{{-- Greeting --}}
|
||||||
|
@if (! empty($greeting))
|
||||||
|
# {{ $greeting }}
|
||||||
|
@else
|
||||||
|
@if ($level == 'error')
|
||||||
|
# Whoops!
|
||||||
|
@else
|
||||||
|
# Hello!
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Intro Lines --}}
|
||||||
|
@foreach ($introLines as $line)
|
||||||
|
{{ $line }}
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Action Button --}}
|
||||||
|
@if (isset($actionText))
|
||||||
|
<?php
|
||||||
|
switch ($level) {
|
||||||
|
case 'success':
|
||||||
|
$color = 'green';
|
||||||
|
break;
|
||||||
|
case 'error':
|
||||||
|
$color = 'red';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$color = 'blue';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
@component('mail::button', ['url' => $actionUrl, 'color' => $color])
|
||||||
|
{{ $actionText }}
|
||||||
|
@endcomponent
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Outro Lines --}}
|
||||||
|
@foreach ($outroLines as $line)
|
||||||
|
{{ $line }}
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<!-- Salutation -->
|
||||||
|
@if (! empty($salutation))
|
||||||
|
{{ $salutation }}
|
||||||
|
@else
|
||||||
|
Regards,<br>{{ config('app.name') }}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<!-- Subcopy -->
|
||||||
|
@if (isset($actionText))
|
||||||
|
@component('mail::subcopy')
|
||||||
|
If you’re having trouble clicking the "{{ $actionText }}" button, copy and paste the URL below
|
||||||
|
into your web browser: [{{ $actionUrl }}]({{ $actionUrl }})
|
||||||
|
@endcomponent
|
||||||
|
@endif
|
||||||
|
@endcomponent
|
||||||
36
code/resources/views/vendor/pagination/bootstrap-4.blade.php
vendored
Executable file
36
code/resources/views/vendor/pagination/bootstrap-4.blade.php
vendored
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="page-item disabled"><span class="page-link">«</span></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Pagination Elements --}}
|
||||||
|
@foreach ($elements as $element)
|
||||||
|
{{-- "Three Dots" Separator --}}
|
||||||
|
@if (is_string($element))
|
||||||
|
<li class="page-item disabled"><span class="page-link">{{ $element }}</span></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Array Of Links --}}
|
||||||
|
@if (is_array($element))
|
||||||
|
@foreach ($element as $page => $url)
|
||||||
|
@if ($page == $paginator->currentPage())
|
||||||
|
<li class="page-item active"><span class="page-link">{{ $page }}</span></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item disabled"><span class="page-link">»</span></li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
@endif
|
||||||
36
code/resources/views/vendor/pagination/default.blade.php
vendored
Executable file
36
code/resources/views/vendor/pagination/default.blade.php
vendored
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="disabled"><span>«</span></li>
|
||||||
|
@else
|
||||||
|
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Pagination Elements --}}
|
||||||
|
@foreach ($elements as $element)
|
||||||
|
{{-- "Three Dots" Separator --}}
|
||||||
|
@if (is_string($element))
|
||||||
|
<li class="disabled"><span>{{ $element }}</span></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Array Of Links --}}
|
||||||
|
@if (is_array($element))
|
||||||
|
@foreach ($element as $page => $url)
|
||||||
|
@if ($page == $paginator->currentPage())
|
||||||
|
<li class="active"><span>{{ $page }}</span></li>
|
||||||
|
@else
|
||||||
|
<li><a href="{{ $url }}">{{ $page }}</a></li>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||||
|
@else
|
||||||
|
<li class="disabled"><span>»</span></li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
@endif
|
||||||
17
code/resources/views/vendor/pagination/simple-bootstrap-4.blade.php
vendored
Executable file
17
code/resources/views/vendor/pagination/simple-bootstrap-4.blade.php
vendored
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="page-item disabled"><span class="page-link">@lang('pagination.previous')</span></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item disabled"><span class="page-link">@lang('pagination.next')</span></li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
@endif
|
||||||
17
code/resources/views/vendor/pagination/simple-default.blade.php
vendored
Executable file
17
code/resources/views/vendor/pagination/simple-default.blade.php
vendored
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="disabled"><span>@lang('pagination.previous')</span></li>
|
||||||
|
@else
|
||||||
|
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li>
|
||||||
|
@else
|
||||||
|
<li class="disabled"><span>@lang('pagination.next')</span></li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
@endif
|
||||||
95
code/resources/views/welcome.blade.php
Executable file
95
code/resources/views/welcome.blade.php
Executable file
@ -0,0 +1,95 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="{{ app()->getLocale() }}">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<title>Laravel</title>
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
<!-- Styles -->
|
||||||
|
<style>
|
||||||
|
html, body {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #636b6f;
|
||||||
|
font-family: 'Raleway', sans-serif;
|
||||||
|
font-weight: 100;
|
||||||
|
height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-height {
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-center {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.position-ref {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-right {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 84px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.links > a {
|
||||||
|
color: #636b6f;
|
||||||
|
padding: 0 25px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: .1rem;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-b-md {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="flex-center position-ref full-height">
|
||||||
|
@if (app('router')->has('login'))
|
||||||
|
<div class="top-right links">
|
||||||
|
@if (auth()->check())
|
||||||
|
<a href="{{ url('/home') }}">Home</a>
|
||||||
|
@else
|
||||||
|
<a href="{{ url('/login') }}">Login</a>
|
||||||
|
<a href="{{ url('/register') }}">Register</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="title m-b-md">
|
||||||
|
Laravel
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="links">
|
||||||
|
<a href="https://laravel.com/docs">Documentation</a>
|
||||||
|
<a href="https://laracasts.com">Laracasts</a>
|
||||||
|
<a href="https://laravel-news.com">News</a>
|
||||||
|
<a href="https://forge.laravel.com">Forge</a>
|
||||||
|
<a href="https://github.com/laravel/laravel">GitHub</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
21
code/routes/api.php
Executable file
21
code/routes/api.php
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Routing\Router;
|
||||||
|
|
||||||
|
/** @var Router $router */
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| API Routes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register API routes for your application. These
|
||||||
|
| routes are loaded by the RouteServiceProvider within a group which
|
||||||
|
| is assigned the "api" middleware group. Enjoy building your API!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$router->get('/user', function (Request $request) {
|
||||||
|
return $request->user();
|
||||||
|
})->middleware('auth:api');
|
||||||
16
code/routes/channels.php
Executable file
16
code/routes/channels.php
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Broadcast Channels
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may register all of the event broadcasting channels that your
|
||||||
|
| application supports. The given channel authorization callbacks are
|
||||||
|
| used to check if an authenticated user can listen to the channel.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Broadcast::channel('App.User.{id}', function ($user, $id) {
|
||||||
|
return (int) $user->id === (int) $id;
|
||||||
|
});
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user