Commit 4329a963 by 杨昕

init

parent ae6063d2
This diff is collapsed. Click to expand it.
<p align="center"><img src="https://laravel.com/assets/img/components/logo-laravel.svg"></p>
<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a>
</p>
## About Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Learning Laravel
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1100 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost you and your team's skills by digging into our comprehensive video library.
## Laravel Sponsors
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[British Software Development](https://www.britishsoftware.co)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- [UserInsights](https://userinsights.com)
- [Fragrantica](https://www.fragrantica.com)
- [SOFTonSOFA](https://softonsofa.com/)
- [User10](https://user10.com)
- [Soumettre.fr](https://soumettre.fr/)
- [CodeBrisk](https://codebrisk.com)
- [1Forge](https://1forge.com)
- [TECPRESSO](https://tecpresso.co.jp/)
- [Runtime Converter](http://runtimeconverter.com/)
- [WebL'Agence](https://weblagence.com/)
- [Invoice Ninja](https://www.invoiceninja.com)
- [iMi digital](https://www.imi-digital.de/)
- [Earthlink](https://www.earthlink.ro/)
- [Steadfast Collective](https://steadfastcollective.com/)
- [We Are The Robots Inc.](https://watr.mx/)
- [Understand.io](https://www.understand.io/)
- [Abdel Elrafa](https://abdelelrafa.com)
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
## License
The Laravel framework is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).
<?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 = [
//
];
/**
* 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 commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}
<?php
/**
* Srs hook表单异常
*/
namespace App\Exceptions;
use Exception;
class ControllerException extends Exception
{
public function __construct() {
$message = func_get_args();
# 记录表单错误日志
parent::__construct(json_encode($message));
}
}
\ No newline at end of file
<?php
/**
* Srs database操作异常处理
*/
namespace App\Exceptions;
use Exception;
class DatabaseException extends Exception
{
public function __construct() {
$message = func_get_args();
# 记录表单错误日志
parent::__construct(json_encode($message));
}
}
\ No newline at end of file
<?php
/**
* Srs hook表单异常
*/
namespace App\Exceptions;
use Exception;
class FormException extends Exception
{
public function __construct() {
$message = func_get_args();
parent::__construct(json_encode($message));
}
}
\ No newline at end of file
<?php
namespace App\Exceptions;
use Exception;
use App\Tool\ToolFunc;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
use ToolFunc;
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
/**
* 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)
{
if (!self::handlerException($exception)) {
parent::report($exception);
}
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
$path = $request->path();
#检测当前请求是否是api路由
if (stripos($path,'api/') === 0
&& ($exception instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException) ) {
return error('resources not found',\Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND);
}
if( ( (stripos($path,'web/') === 0 && strrpos($path,'.php') !== false) || (stripos($path,'web/') === 0 && strrpos($path,'.html') !== false ) ) && ($exception instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException) ) {
if (view()->exists('errors.404')) {
return response()->view('errors.404');
}
}
if (self::handlerException($exception)) {
# 获取常量类里面的异常常量
$message = json_decode($exception->getMessage(),true);
return error(...$message);
} else if ($exception instanceof AuthenticationException) {
return error($exception->getMessage(),\Symfony\Component\HttpFoundation\Response::HTTP_UNAUTHORIZED);
} else if ($exception instanceof \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException) {
return error('请求方法不被允许',\Symfony\Component\HttpFoundation\Response::HTTP_METHOD_NOT_ALLOWED);
} else if ($exception instanceof \Symfony\Component\HttpKernel\Exception\HttpException) {
if ($exception->getMessage() == 'Too Many Attempts.') {
return error('请求接口过于频繁',429);
}
}
if ($request->is('api/*')) {
return error('服务器请求异常:'.$exception->getMessage()."异常信息详情:".$exception->getTraceAsString(),500);
} else {
if ($exception->getMessage() != '') {
//print_r($exception->getMessage());
if ($exception->getMessage() == 403) {
return response()->view('errors.403');
}
return response()->view('errors.404');
}
#return response()->json(['code'=>403, 'msg'=>'您没有权限']);
}
return parent::render($request, $exception);
}
}
<?php
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Support\Facades\Session;
function success($data = [], $code = Response::HTTP_OK, $msg = '操作成功')
{
return response()->json(['code' => $code, 'data' => $data, 'msg' => $msg]);
}
function error(string $msg, $code = Response::HTTP_INTERNAL_SERVER_ERROR)
{
return response()->json(['code' => $code, 'msg' => $msg]);
}
function handler_drive($callback)
{
try {
if (!is_callable($callback)) {
throw new \Exception('callback is not callable');
}
$result = $callback();
} catch (\Exception $e) {
$error_message = $e->getMessage();
$result = \App\Tool\ToolFunc::handlerException($e);
if ($result) {
$message = json_decode($error_message, true);
$exception = '\\App\\Exceptions\\' . $result[0];
throw new $exception(...$message);
}
throw new \App\Exceptions\ControllerException($error_message);
}
return $result;
}
/**
* 通过curl获取数据
* @param $url
* @param bool $isHearder
* @param bool $post
* @return mixed
*/
function http_request_code($url, $isHearder = null, $post = 'GET', $data = null, $timeout = 1)
{
//初始化curl
$ch = curl_init();
//设置URL地址
curl_setopt($ch, CURLOPT_URL, $url);
//设置header信息
if (!empty($isHearder)) {
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, $isHearder);
}
//如果是post,则把data的数据传递过去
if (($post == 'POST') && $data) {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}
//如果是删除方法,则是以delete请求
if ($post == 'DELETE') {
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
}
//设置超时时间,毫秒
curl_setopt($ch, CURLOPT_TIMEOUT_MS, $timeout * 100);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//执行CURL时间
$result = curl_exec($ch);
//如果有异常,记录到日志当中
$curl_errno = curl_errno($ch);
if ($curl_errno > 0) {
}
//关闭URL,返回数据
curl_close($ch);
return $result;
}
//添加日志
function addLog($content, int $level = 0)
{
$levelArr = ['info', 'warn', 'error'];
//准备数据
$data = [
'app' => 'center-cloud',
'content' => $content,
'level' => $levelArr[$level],
'create_time' => date('Y-m-d H:i:s', time())
];
$date = date('Y-m-d');
$path = "/data/logs/center-cloud{$date}.json";
file_put_contents($path, json_encode($data, JSON_UNESCAPED_UNICODE), FILE_APPEND);
}
/**
* 记录本地日志
* @param $content
* @param bool $clean
* @param bool $exit
*/
function nodeFileLog($content, $clean = false)
{
//转换成json存储
$content = json_encode($content, JSON_UNESCAPED_UNICODE) . PHP_EOL;
//判断是否覆盖
$append = $clean ? null : FILE_APPEND;
//写入日志
$date = date('Y-m-d');
file_put_contents("/data/logs/simple{$date}.json", $content, $append);
}
#获取客户端ip
function getIp()
{
if (isset ($_SERVER ['HTTP_X_FORWARDED_FOR'])) {
$clientIP = $_SERVER ['HTTP_X_FORWARDED_FOR'];
} elseif (isset ($_SERVER ['HTTP_X_REAL_IP'])) {
$clientIP = $_SERVER ['HTTP_X_REAL_IP'];
} else {
$clientIP = $_SERVER['REMOTE_ADDR'];
}
addLog($_SERVER);
return $clientIP;
}
#比较两个日期字符串的大小
function compare_data($data1, $data2)
{
return (strtotime($data1) > strtotime($data2)) ? true : false;
}
function updateRule($rule, $data)
{
foreach ($data as $key => $val) {
if (!isset($rule[$key])) {
continue;
}
foreach ($rule[$key] as $rkey => $rval) {
$tmp = check($val, $rval, $rkey);
if ($tmp == false) {
return error("未通过验证规则:$key-$rkey-" . json_encode($rval));
}
}
}
}
/**
* 验证数据 支持 in between equal length regex expire
* @access public
* @param string $value 验证数据
* @param mixed $rule 验证表达式
* @param string $type 验证方式 默认为正则验证
* @return boolean
*/
function check($value, $rule, $type = 'regex')
{
$type = strtolower(trim($type));
switch ($type) {
case 'in':// 验证是否在某个指定范围之内 逗号分隔字符串或者数组
case 'notin':
$range = is_array($rule) ? $rule : explode(',', $rule);
return 'in' == $type ? in_array($value, $range) : !in_array($value, $range);
case 'between':// 验证是否在某个范围
case 'notbetween': // 验证是否不在某个范围
if (is_array($rule)) {
$min = $rule[0];
$max = $rule[1];
} else {
list($min, $max) = explode(',', $rule);
}
return 'between' == $type ? $value >= $min && $value <= $max : $value < $min || $value > $max;
case 'equal':// 验证是否等于某个值
case 'notequal': // 验证是否等于某个值
return 'equal' == $type ? $value == $rule : $value != $rule;
case 'length': // 验证长度
$length = mb_strlen($value, 'utf-8'); // 当前数据长度
if (strpos($rule, ',')) {
// 长度区间
list($min, $max) = explode(',', $rule);
return $length >= $min && $length <= $max;
} else {
// 指定长度
return $length == $rule;
}
case 'expire':
list($start, $end) = explode(',', $rule);
if (!is_numeric($start)) {
$start = strtotime($start);
}
if (!is_numeric($end)) {
$end = strtotime($end);
}
return NOW_TIME >= $start && NOW_TIME <= $end;
case 'regex':
default: // 默认使用正则验证 可以使用验证类中定义的验证名称
// 检查附加规则
return regex($value, $rule);
}
}
/**
* 使用正则验证数据
* @access public
* @param string $value 要验证的数据
* @param string $rule 验证规则
* @return boolean
*/
function regex($value, $rule)
{
$validate = array(
'require' => '/\S+/',
'email' => '/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/',
'url' => '/^http(s?):\/\/(?:[A-za-z0-9-]+\.)+[A-za-z]{2,4}(:\d+)?(?:[\/\?#][\/=\?%\-&~`@[\]\':+!\.#\w]*)?$/',
'currency' => '/^\d+(\.\d+)?$/',
'number' => '/^\d+$/',
'zip' => '/^\d{6}$/',
'integer' => '/^[-\+]?\d+$/',
'double' => '/^[-\+]?\d+(\.\d+)?$/',
'english' => '/^[A-Za-z]+$/',
'datetime' => '/^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/',
);
// 检查是否有内置的正则表达式
if (isset($validate[strtolower($rule)])) {
$rule = $validate[strtolower($rule)];
}
return preg_match($rule, $value) === 1;
}
/**
* 获取用户基本信息
* @return array|mixed
*/
function getAdmin(){
$userStr = Session::get("user");
if (!$userStr){
$user = new stdClass();
$user->name = '';
}else{
$user = json_decode($userStr);
}
return $user;
}
function parse_custom_str($str, $handle = '/')
{
$str = substr($str, strpos($str, $handle) + 1);
return $str;
}
function get_prefix()
{
$current = \Illuminate\Support\Facades\URL::current();
$url_arr = explode('/', $current);
$prefix = '/' . $url_arr[3] ?? '/web';
return $prefix;
}
/**
* 生成UUID标识并检测UUID是否重复
*/
function generateRandomNum( $len = 32, $md5 = true ) {
# Seed random number generator
# Only needed for PHP versions prior to 4.2
mt_srand( (double)microtime()*1000000 );
# Array of characters, adjust as desired
$chars = array(
'Q', '@', '8', 'y', '%', '^', '5', 'Z', '(', 'G', '_', 'O', '`',
'S', '-', 'N', '<', 'D', '{', '}', '[', ']', 'h', ';', 'W', '.',
'/', '|', ':', '1', 'E', 'L', '4', '&', '6', '7', '#', '9', 'a',
'A', 'b', 'B', '~', 'C', 'd', '>', 'e', '2', 'f', 'P', 'g', ')',
'?', 'H', 'i', 'X', 'U', 'J', 'k', 'r', 'l', '3', 't', 'M', 'n',
'=', 'o', '+', 'p', 'F', 'q', '!', 'K', 'R', 's', 'c', 'm', 'T',
'v', 'j', 'u', 'V', 'w', ',', 'x', 'I', '$', 'Y', 'z', '*'
);
# Array indice friendly number of chars;
$numChars = count($chars) - 1; $token = '';
# Create random token at the specified length
for ( $i=0; $i<$len; $i++ )
$token .= $chars[ mt_rand(0, $numChars) ];
# Should token be run through md5?
if ( $md5 ) {
# Number of 32 char chunks
$chunks = ceil( strlen($token) / 32 ); $md5token = '';
# Run each chunk through md5
for ( $i=1; $i<=$chunks; $i++ )
$md5token .= md5( substr($token, $i * 32 - 32, 32) );
# Trim the token
$token = substr($md5token, 0, $len);
}
return $token;
}
\ No newline at end of file
<?php
namespace App\Http\Controllers\Api\Client;
use App\Model\MediaCategoryModel;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class MediaCategoryController extends Controller
{
public function index(Request $request){
$result = handler_drive(function () use ($request) {
$catgList = MediaCategoryModel::catgList($request);
return $catgList;
});
return success($result);
}
}
<?php
namespace App\Http\Controllers\Api\Client;
use App\Model\QiniuModel;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Qiniu\Auth;
class MediaController extends Controller
{
private $bucketList = [
'develop' => 'dev-offcncloud',
'test' => 'test-offcncloud',
'master' => 'offcncloud',
];
/**
* 获取媒资ID
* @param Request $request
* @return \Illuminate\Http\JsonResponse
* @throws \App\Exceptions\ControllerException
*/
public function getMediaNum(Request $request){
$result = handler_drive(function () use ($request) {
return ["mediaID" => date('YmdHis',time()).generateRandomNum(8)];
});
return success($result);
}
/**
* 获取上传媒资token
* @param Request $request
* @return \Illuminate\Http\JsonResponse
* @throws \App\Exceptions\ControllerException
*/
public function getUploadMediaToken(Request $request){
$result = handler_drive(function () use ($request) {
$branch = empty(getenv('branch')) ? 'test' : getenv('branch');
$token = QiniuModel::uploadToken($this->bucketList[$branch]);
return ["token" => $token];
});
return success($result);
}
}
<?php
namespace App\Http\Controllers\Api\Client;
use App\Model\OrganizationModel;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class OrganizationController extends Controller
{
public function getOrigList(Request $request){
$response = handler_drive(function () use ($request) {
OrganizationModel::orgList();
});
}
}
<?php
namespace App\Http\Controllers\Api\Client;
use App\Exceptions\ControllerException;
use App\Exceptions\DatabaseException;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
class UsersController extends Controller
{
/**
* 第三方验权
* @param Request $request
* @return \Illuminate\Http\JsonResponse
* @throws ControllerException
*/
public function store(Request $request){
$response = handler_drive(function () use ($request) {
if (!$request->password) {
throw new ControllerException(400, '口令不能为空');
}
if ($request->filled('username')) {
if (mb_strlen($request->username)>=20) {
$request->username = mb_substr($request->username,0,20,"UTF-8").'...';
}
} else {
throw new ControllerException(400, '昵称必须填写');
}
if (preg_match("['|\"|\/|\\\|\.|:]", $request->uuid)) {
throw new ControllerException(400, 'uuid含有非法字符');
}
$password = strtolower($request->password);
$username = $request->username;
/**
* 用户为offcn,不走第三方认证
*/
if ($username == 'offcn'){
$user = DB::connection('mongodb') //选择使用mongodb
->collection('users')->where('name',$username)->first();
if (empty($user)){
$data = [
'name' => $username,
'password' => md5(123123),
'organization_id' => 0,
'status' => 0,
'create_time' => date('Y-m-d H:i:s',time())
];
DB::connection("mongodb")->collection("users")->insertGetId($data);
$result = true;
}else{
if ($user['password'] == md5($password)){
$result = true;
}else{
$result = false;
}
}
}else{
$url = "http://test-live.offcncloud.com/api/login";
$result = http_request_code($url,
['Content-Type'=>'application/x-www-form-urlencoded'],
'POST',
['username' => $username,'password' => $password],
200
);
$result = json_decode($result,true);
if ($result['code']!=200){
$result = false;
}
}
if ($result){
$data = [
'name' => $username,
'password' => md5($password),
'organization_id' => 0,
'status' => 0,
'create_time' => date('Y-m-d H:i:s',time())
];
$user = DB::connection('mongodb') //选择使用mongodb
->collection('users')->where('name',$username)->first();
$token = $this->generateToken();
if ($user){
$idArr = ($user['_id'])->jsonSerialize();
}else{
$id = DB::connection("mongodb")->collection("users")->insertGetId($data);
$idArr = ($id)->jsonSerialize();
}
$_id = $idArr['$oid'];
$newtoken = encrypt($_id.'|'.$token."|1ZGHd3pCc87AsQFBLLJeMjM4t57cli6Ar78qowe7");
$data['token'] = $newtoken;
DB::connection('mongodb')->collection('users')->where('_id',$_id)->update($data);
return $newtoken;
}else{
throw new DatabaseException('用户名称或者密码错误');
}
});
return success($response);
}
/**
* 生成UUID标识并检测UUID是否重复
*/
private function generateToken( $len = 32, $md5 = true ) {
# Seed random number generator
# Only needed for PHP versions prior to 4.2
mt_srand( (double)microtime()*1000000 );
# Array of characters, adjust as desired
$chars = array(
'Q', '@', '8', 'y', '%', '^', '5', 'Z', '(', 'G', '_', 'O', '`',
'S', '-', 'N', '<', 'D', '{', '}', '[', ']', 'h', ';', 'W', '.',
'/', '|', ':', '1', 'E', 'L', '4', '&', '6', '7', '#', '9', 'a',
'A', 'b', 'B', '~', 'C', 'd', '>', 'e', '2', 'f', 'P', 'g', ')',
'?', 'H', 'i', 'X', 'U', 'J', 'k', 'r', 'l', '3', 't', 'M', 'n',
'=', 'o', '+', 'p', 'F', 'q', '!', 'K', 'R', 's', 'c', 'm', 'T',
'v', 'j', 'u', 'V', 'w', ',', 'x', 'I', '$', 'Y', 'z', '*'
);
# Array indice friendly number of chars;
$numChars = count($chars) - 1; $token = '';
# Create random token at the specified length
for ( $i=0; $i<$len; $i++ )
$token .= $chars[ mt_rand(0, $numChars) ];
# Should token be run through md5?
if ( $md5 ) {
# Number of 32 char chunks
$chunks = ceil( strlen($token) / 32 ); $md5token = '';
# Run each chunk through md5
for ( $i=1; $i<=$chunks; $i++ )
$md5token .= md5( substr($token, $i * 32 - 32, 32) );
# Trim the token
$token = substr($md5token, 0, $len);
}
return $token;
}
}
<?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.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?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.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
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.
*
* @return void
*/
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 Validator::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 \App\User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
}
<?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.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\VerifiesEmails;
class VerificationController extends Controller
{
/*
|--------------------------------------------------------------------------
| Email Verification Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling email verification for any
| user that recently registered with the application. Emails may also
| be re-sent if the user didn't receive the original email message.
|
*/
use VerifiesEmails;
/**
* Where to redirect users after verification.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
$this->middleware('signed')->only('verify');
$this->middleware('throttle:6,1')->only('verify', 'resend');
}
}
<?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;
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function index()
{
return view('home');
}
}
<?php
/**
* Created by PhpStorm.
* User: yangx
* Date: 2020/6/23
* Time: 下午12:15
*/
namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
class IndexController extends Controller
{
function index(){
$userInfo = getAdmin();
return view('admin.index');
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: yangx
* Date: 2020/6/23
* Time: 下午12:19
*/
namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Session;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class LoginController extends Controller
{
/**
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\JsonResponse|\Illuminate\View\View
*/
public function login(Request $request)
{
if (request()->isMethod('post')) {
$url = "http://local.live.offcncloud.com/api/login";
$result = http_request_code($url,
['Content-Type'=>'application/x-www-form-urlencoded'],
'POST',
['username' => 'test3','password' => '123123'],
20
);
if ($result){
$res = json_decode($result,true);
if ($res['data']){
$params = $request->all();
$user = DB::connection('mongodb') //选择使用mongodb
->collection('users')->where('name',$request->name)->first();
if ($user){
Session::put("user",json_encode($user));
return success($user);
}
$id = DB::connection("mongodb")->collection("users")->insertGetId($params);
$id = ($id)->jsonSerialize();
$params['_id'] = $id['$oid'];
Session::put("user",json_encode($params));
return success($params);
}else{
return error('用户验证失败');
}
}else{
return error('用户验证失败');
}
} else {
return view('admin.login');
}
}
/**
* 退出
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function logout(Request $request)
{
Session::remove('user');
return Redirect('/web/login');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers\Web;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class MediaController extends Controller
{
public static function generateMediaNum(){
}
}
<?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 = [
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::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,
\App\Http\Middleware\ApiMiddleware::class,
],
'auth' => [\App\Http\Middleware\Apprialisal::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' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
/**
* The priority-sorted list of middleware.
*
* This forces non-global middleware to always be in the given order.
*
* @var array
*/
protected $middlewarePriority = [
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
];
}
<?php
namespace App\Http\Middleware;
use App\Exceptions\ControllerException;
use Closure;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Redirect;
class ApiMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$url = $request->path();
$except_url = [
'web/login',
'web/logout',
];
if (in_array($url,$except_url)){
return $next($request);
}
$user = getAdmin();
$ajax = $request->ajax();
if (empty($user->name)){
if ($ajax){
throw new ControllerException(Response::HTTP_UNAUTHORIZED);
}
return Redirect::to("web/logout");
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use Carbon\Carbon;
use App\Exceptions\ControllerException;
//use Illuminate\Support\Facades\DB;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Support\Facades\DB;
class Apprialisal
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
//DB::connection()->disableQueryLog();
$headers = $request->header();
if ($request->path() == 'api/v1/users' && request()->method() == 'POST') {
return $next($request);
}
if (!isset($headers['authorization']) || empty($headers['authorization'][0])) {
return error("请求异常:Authorization不存在",1013);
}
$token = substr($headers['authorization'][0],7);
$user = DB::connection('mongodb')->collection("users")->where("token",$token)->first();
if (empty($user)){
return error("请求异常:Authorization不存在",1014);
}
try {
$params = decrypt($token);
} catch (DecryptException $e) {
return error('token非法');
}
$idArr = ($user['_id'])->jsonSerialize();
$_id = $idArr['$oid'];
$request->replace(array_merge($request->all(), [
'access_token' => substr($headers['authorization'][0], 7),
'token_nickname' => $user['name'],
'token_user_id' => $_id,
]));
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
class CheckForMaintenanceMode extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array
*/
protected $except = [
//
];
}
<?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array
*/
protected $except = [
//
];
}
<?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);
}
}
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_confirmation',
];
}
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
*/
protected $proxies;
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
}
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
*
* @var bool
*/
protected $addHttpCookie = true;
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'*'
];
}
<?php
/**
* Created by PhpStorm.
* User: nxtvadmin
* Date: 2018/7/17
* Time: 13:59
*/
namespace App\Http\Routes\Web;
use Illuminate\Contracts\Routing\Registrar;
use Illuminate\Support\Facades\Route;
class AuthenRoute
{
public function map(Registrar $router, $callback)
{
if (is_subclass_of($this, __CLASS__)) {
#子类调用
Route::group(
['prefix' => 'web', 'middleware' => ['web'], 'namespace' => 'Web'],
function ($router) use ($callback) {
$callback($router);
}
);
}
}
}
<?php
/**
* Created by PhpStorm.
* User: nxtvadmin
* Date: 2018/7/17
* Time: 11:28
* 会用路由
*/
namespace App\Http\Routes\Web;
use Illuminate\Contracts\Routing\Registrar;
class MemberRoute extends AuthenRoute
{
public function map(Registrar $router,$callback){
parent::map($router,function() use ($router){
$router->resource('member','MemberController');
$router->post('member/disable','MemberController@disable');
});
}
}
\ No newline at end of file
<?php
namespace App\Model;
use App\Exceptions\DatabaseException;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class MediaCategoryModel extends Model
{
protected static $collection = "media_category";
/**
* 查询媒资列表
* @param $request
* @return mixed
* @throws DatabaseException
*/
public static function catgList($request){
try{
$catgList = DB::connection("mongodb")->collection(self::$collection)->paginate(10);
}catch (\Exception $exception){
throw new DatabaseException("组织不存在");
}
return $catgList;
}
/**
* 添加媒资类别
* @param $request
* @return mixed
* @throws DatabaseException
*/
public static function addMediaCatg($request){
try{
$data = [
'name' => $request->name??"百度",
'status' => 0
];
$mediaCatg = DB::connection("mongodb")->collection(self::$collection)->where('name',$request->name)->first();
if (!empty($mediaCatg)){
throw new \Exception('媒资类别已经存在');
}
$id = DB::connection("mongodb")->collection(self::$collection)->insertGetId($data);
}catch (\Exception $exception){
throw new DatabaseException("组织不存在");
}
return $id;
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class ModuleModel extends Model
{
public static function getModuleList(){
$module = file_get_contents('module.json');
return json_decode($module,true);
}
}
<?php
namespace App\Model;
use App\Exceptions\DatabaseException;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class OrganizationModel extends Model
{
protected static $collection = "organization";
public static function orgList($request){
try{
$orgList = DB::connection("mongodb")->collection(self::$collection)->paginate(10);
}catch (\Exception $exception){
throw new DatabaseException("组织不存在");
}
return $orgList;
}
}
<?php
/**
* Created by PhpStorm.
* User: yangx
* Date: 2020/6/30
* Time: 下午1:35
*/
namespace App\Model;
final class QiniuModel
{
private static $accessKey = "5ClMHcAd5KN6oN6SC7ni7uuwOOpaSvoDRMHR_3l8";
private static $secretKey = "saqgin-1cokqa-gipbIv";
// public function __construct($accessKey, $secretKey)
// {
// $this->accessKey = $accessKey;
// $this->secretKey = $secretKey;
// }
public static function getAccessKey()
{
return self::$accessKey;
}
private static function sign($data)
{
$hmac = hash_hmac('sha1', $data, self::$secretKey, true);
return self::$accessKey . ':' . \Qiniu\base64_urlSafeEncode($hmac);
}
public static function signWithData($data)
{
$encodedData = \Qiniu\base64_urlSafeEncode($data);
return self::sign($encodedData) . ':' . $encodedData;
}
public function signRequest($urlString, $body, $contentType = null)
{
$url = parse_url($urlString);
$data = '';
if (array_key_exists('path', $url)) {
$data = $url['path'];
}
if (array_key_exists('query', $url)) {
$data .= '?' . $url['query'];
}
$data .= "\n";
if ($body !== null && $contentType === 'application/x-www-form-urlencoded') {
$data .= $body;
}
return $this->sign($data);
}
public function verifyCallback($contentType, $originAuthorization, $url, $body)
{
$authorization = 'QBox ' . $this->signRequest($url, $body, $contentType);
return $originAuthorization === $authorization;
}
public function privateDownloadUrl($baseUrl, $expires = 3600)
{
$deadline = time() + $expires;
$pos = strpos($baseUrl, '?');
if ($pos !== false) {
$baseUrl .= '&e=';
} else {
$baseUrl .= '?e=';
}
$baseUrl .= $deadline;
$token = $this->sign($baseUrl);
return "$baseUrl&token=$token";
}
public static function uploadToken($bucket="", $key = null, $expires = 3600, $policy = null, $strictPolicy = true)
{
$deadline = time() + $expires;
$scope = $bucket;
if ($key !== null) {
$scope .= ':' . $key;
}
$args = self::copyPolicy($args, $policy, $strictPolicy);
$args['scope'] = $scope;
$args['deadline'] = $deadline;
$b = json_encode($args);
return self::signWithData($b);
}
/**
*上传策略,参数规格详见
*http://developer.qiniu.com/docs/v6/api/reference/security/put-policy.html
*/
private static $policyFields = array(
'callbackUrl',
'callbackBody',
'callbackHost',
'callbackBodyType',
'callbackFetchKey',
'returnUrl',
'returnBody',
'endUser',
'saveKey',
'insertOnly',
'detectMime',
'mimeLimit',
'fsizeMin',
'fsizeLimit',
'persistentOps',
'persistentNotifyUrl',
'persistentPipeline',
'deleteAfterDays',
'fileType',
'isPrefixalScope',
);
private static function copyPolicy(&$policy, $originPolicy, $strictPolicy)
{
if ($originPolicy === null) {
return array();
}
foreach ($originPolicy as $key => $value) {
if (!$strictPolicy || in_array((string)$key, self::$policyFields, true)) {
$policy[$key] = $value;
}
}
return $policy;
}
public function authorization($url, $body = null, $contentType = null)
{
$authorization = 'QBox ' . $this->signRequest($url, $body, $contentType);
return array('Authorization' => $authorization);
}
public function authorizationV2($url, $method, $body = null, $contentType = null)
{
$urlItems = parse_url($url);
$host = $urlItems['host'];
if (isset($urlItems['port'])) {
$port = $urlItems['port'];
} else {
$port = '';
}
$path = $urlItems['path'];
if (isset($urlItems['query'])) {
$query = $urlItems['query'];
} else {
$query = '';
}
//write request uri
$toSignStr = $method . ' ' . $path;
if (!empty($query)) {
$toSignStr .= '?' . $query;
}
//write host and port
$toSignStr .= "\nHost: " . $host;
if (!empty($port)) {
$toSignStr .= ":" . $port;
}
//write content type
if (!empty($contentType)) {
$toSignStr .= "\nContent-Type: " . $contentType;
}
$toSignStr .= "\n\n";
//write body
if (!empty($body)) {
$toSignStr .= $body;
}
$sign = $this->sign($toSignStr);
$auth = 'Qiniu ' . $sign;
return array('Authorization' => $auth);
}
}
\ No newline at end of file
<?php
namespace App\Model;
use App\Exceptions\DatabaseException;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Jenssegers\Mongodb\Auth\User as Authenticatable;
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
class UserModel extends Eloquent
{
/**
* mongodb collection 名字
*/
protected $collection = 'users';
/*
* 获取用户列表
*/
public static function getUserList(){
try{
// $str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
//
// for ($i = 0;$i<50;$i++){
//
// $data = [
// 'name' => substr(str_shuffle($str),5,10),
// 'create_time' => date('Y-m-d H:i:s',time()),
// 'status' => 0,
// 'password' => md5(123456)
// ];
//
// DB::connection("mongodb")->collection("users")->insertGetId($data);
//
// }
// die;
$users = DB::connection('mongodb')->collection('users')
->paginate(10);
// dd($users);die;
foreach ( $users as $user){
$idArr = ($user['_id'])->jsonSerialize();
$user['_id'] = $idArr['$oid'];
}
}catch (\Exception $exception){
throw new DatabaseException($exception->getMessage());
}
return $users;
}
public static function updateUserStatus(){
try{
// $flag = DB::connection('mongodb')->collection("users")->
}catch (\Exception $exception){
throw new \Exception($exception->getMessage());
}
}
/**
* 获取用户基本信息
* @param $id
* @return mixed
* @throws DatabaseException
*/
public static function getUserInfoById($id){
try{
$user = DB::connection("mongodb")->collection("users")->find($id);
}catch (\Exception $exception){
throw new DatabaseException($exception->getMessage());
}
return $user;
}
}
<?php
namespace App\Providers;
use App\Model\ModuleModel;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
view()->composer('*', function ($view) {
$result = ModuleModel::getModuleList();
$view->with([
'left' => $result,
]);
});
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}
<?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');
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}
<?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();
Route::group(['namespace' => $this->namespace],function($router){
$route_path = app_path('Http/Routes');
$files = \File::allFiles($route_path);
if (!empty($files)) {
foreach ($files as $k => $v) {
$name = str_replace('/','\\',$files[$k]->getRelativePathname());
if (strpos($name,'.php',true) !== false) {
$this->app->make('App\\Http\\Routes\\'.str_replace('.php','',$name))
->map($router,$callback=null);
}
}
}
});
}
/**
* 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'));
}
}
<?php
namespace App\Tool;
use \Symfony\Component\HttpFoundation\Response;
/**
* 常用函数
*/
trait ToolFunc
{
/**
* 检测当前异常是否属于自定义异常
* @param Exception $exception 抛出的异常
* @return Array $arr 当前异常的类名和自定义异常的数组
*/
public static function handlerException($exception)
{
$class_name = self::getClassName($exception);
$files = self::getExceptionFileName();
$bool = in_array($class_name, $files);
if ($bool) {
return [$class_name,$files];
} else {
return false;
}
}
/**
* getClassName 获取当前触发异常的异常类名
* @param Exception $exception 异常对象
* @return String $str 异常类名字
*/
public static function getClassName($exception)
{
return substr(strrchr(get_class($exception), '\\'), 1);
}
/**
* getExceptionFileName获取app/Exceptions下面所有的异常类文件并按照文件名排序
* @return Array $files 文件名数组
*/
public static function getExceptionFileName()
{
$files = array_map(function ($v) {
return basename($v, '.php');
}, glob(app_path('Exceptions').'/*Exception.php'));
return $files;
}
/**
* 控制器抛出异常
*/
public static function exceptionHandler($e, ...$ext)
{
$error_message = $e->getMessage();
$result = self::handlerException($e);
if ($result) {
$message = json_decode($error_message, true);
if ($ext[0] == 'throw') {
$exception = '\\App\\Exceptions\\'.$result[0];
throw new $exception(...$message);
} else {
return $message;
}
} else {
if ($ext[0] == 'throw') {
array_shift($ext);
throw new \App\Exceptions\ControllerException(...$ext);
} else {
return $error_message;
}
}
}
// function handler_drive($callback)
// {
// try {
// if (!is_callable($callback)) {
// throw new \Exception('callback is not callable');
// }
// $result = $callback();
// } catch (\Exception $e) {
// $error_message = $e->getMessage();
// $result = \App\Tool\ToolFunc::handlerException($e);
// if ($result) {
// $message = json_decode($error_message, true);
// $exception = '\\App\\Exceptions\\' . $result[0];
// throw new $exception(...$message);
// }
//
// throw new \App\Exceptions\ControllerException($error_message);
// }
// return $result;
// }
/**
* 处理put传过来的值
* @param str
* @return array data
*/
public static function getPutValueHandle($request)
{
$str = $request->getContent();
$r = explode(PHP_EOL, $str);
$request_temp = [];
foreach ($r as $k => $v) {
$v = trim($v);
if ($v == '' || ( strpos($v, '---') ) === 0) {
unset($r[$k]);
}
if (preg_match('/"(.*)"/', $v, $name)) {
$request_temp[$name[1]] = str_replace(["\r\n","\r","\n"], '', $r[$k+2]);
}
}
$request->replace($request_temp);
}
/**
* 节点排序
*/
public static function sortPermission($temp, $temp1)
{
foreach ($temp as $key => $value) {
foreach ($temp1 as $k => $v) {
if ($value['id'] == $k) {
array_unshift($v, $value);
unset($temp[$key]);
array_splice($temp, $key, 0, $v);
unset($temp1[$k]);
return [$temp,$temp1];
}
}
}
}
/**
* 添加分页浏览ID
* @param obj $obj 数据集
* @param int $page 当前页码
* @return $obj
*/
public static function addPageNum($obj, $page = 1)
{
foreach ($obj as $k => $v) {
if ($page && $page > 1) {
$v->num = 10 * ($page - 1) + $k + 1;
} else {
$v->num = $k+1;
}
}
return $obj;
}
/**
* 转换一个int为byte大小
* @param $val 需要转换的字符串
* @return **MB
*/
public static function calc($size, $digits = 2)
{
if (!$size) {
return 0;
}
if (is_numeric($size)) {
$unit= array('','K','M','G','T','P');
$base= 1024;
$i = floor(log($size, $base));
$n = count($unit);
if ($i >= $n) {
$i=$n-1;
}
return round($size/pow($base, $i), $digits).' '.$unit[$i] . 'B';
} else {
return $size;
}
}
/**
* 房间是否失效
*/
public static function checkRoomFail($room_id)
{
$r = \App\Model\RoomModel::where('id', $room_id)->first();
if ($r === null) {
throw new \App\Exceptions\ControllerException(1019, '房间不存在');
}
$r = $r->toArray();
if ($r['status'] == 0) {
throw new \App\Exceptions\ControllerException(1020, '房间还未编辑,不能进行该操作');
}
$time = strtotime($r['end_time']);
if (time() >= ($time + 86400)) {
throw new \App\Exceptions\ControllerException(1021, ',不能进行该操作');
}
}
/**
* 对称加密
* @param string $string
* @param string $skey
* @return mixed
*/
public static function encode($string = "")
{
$strArr = str_split(base64_encode($string));
$strCount = count($strArr);
foreach (str_split('20190115.offcn.com') as $key => $value) {
$key < $strCount && $strArr[$key] .= $value;
}
return str_replace(array('=', '+', '/'), array('O0O0O', 'o000o', 'oo00o'), join($strArr));
}
/**
* 判断是否有base64加密
* @param $str
* @return bool
*/
public static function is_base64($str)
{
if(mb_strlen($str) >= 8) {
return $str == base64_encode(base64_decode($str)) ? true : false;
}
}
/**
* sign签名
*/
public static function get_sign($data)
{
//对数组的值按key排序
ksort($data);
// 生成url的形式
$params = http_build_query($data);
// 生成sign
$sign = md5($params . '69b72c8$M^O(F`F8CdN5f13517');
return $sign;
}
public function validatorBoolean($value)
{
return preg_match('/^[01]{1}$/', $value);
}
}
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Jenssegers\Mongodb\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
protected $collection = 'users';
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
}
#!/usr/bin/env php
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| 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__.'/vendor/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);
<?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(
$_ENV['APP_BASE_PATH'] ?? dirname(__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;
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"jacobcyl/ali-oss-storage": "^2.1",
"jenssegers/mongodb": "^3.4.1",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"qiniu/php-sdk": "^7.2"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
],
"files": [
"app/Helpers/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<?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 the 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'),
'asset_url' => env('ASSET_URL', null),
/*
|--------------------------------------------------------------------------
| 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' => 'Asia/Shanghai',
/*
|--------------------------------------------------------------------------
| 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' => 'en',
/*
|--------------------------------------------------------------------------
| 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',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| 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',
/*
|--------------------------------------------------------------------------
| 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...
*/
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
/*
* 自定义
*/
Jenssegers\Mongodb\MongodbServiceProvider::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,
/**
* 自定义
*/
'Mongo' => Jenssegers\Mongodb\MongodbServiceProvider::class,
'Moloquent' => 'Jenssegers\Mongodb\Eloquent\Model',
],
'client_request_parameters' => [
'token_user_id' => 'required',
'access_token' => 'required',
],
];
<?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,
],
],
];
<?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' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
<?php
use Illuminate\Support\Str;
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' => 'cache',
],
],
/*
|--------------------------------------------------------------------------
| 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' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
];
<?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', 'mongodb'),
/*
|--------------------------------------------------------------------------
| 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' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'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' => '',
'prefix_indexes' => true,
'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' => '',
'prefix_indexes' => true,
'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' => '',
'prefix_indexes' => true,
],
'mongodb' => [
'driver' => 'mongodb',
'host' => 'mongo.eoffcn.com',
'port' => '28017',
'database' => 'video_media',
'username' => 'root',
'password' => 'FHHTH98AWAPoyweEasdfadfaaf',
'options' => [
'database' => 'admin', // sets the authentication database required by mongo 3
]
],
],
/*
|--------------------------------------------------------------------------
| 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 body of commands than a typical key-value system
| 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' => env('REDIS_DB', 0),
],
'cache' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
],
];
<?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", "sftp", "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_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],
];
<?php
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['daily'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 14,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
],
'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],
'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],
],
];
<?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'),
],
],
/*
|--------------------------------------------------------------------------
| Log Channel
|--------------------------------------------------------------------------
|
| If you are using the "log" driver, you may specify the logging channel
| if you prefer to keep mail messages separate from other log entries
| for simpler reading. Otherwise, the default channel will be used.
|
*/
'log_channel' => env('MAIL_LOG_CHANNEL'),
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| 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 every one. Here you may define a default connection.
|
*/
'default' => env('QUEUE_CONNECTION', '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.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'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' => env('SQS_KEY', 'your-public-key'),
'secret' => env('SQS_SECRET', 'your-secret-key'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'your-queue-name'),
'region' => env('SQS_REGION', 'us-east-1'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
],
],
/*
|--------------------------------------------------------------------------
| 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',
],
];
<?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'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => env('SES_REGION', 'us-east-1'),
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
'webhook' => [
'secret' => env('STRIPE_WEBHOOK_SECRET'),
'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
],
],
];
<?php
use Illuminate\Support\Str;
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' => env('SESSION_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' => env('SESSION_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' => env('SESSION_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' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', '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,
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place.
|
| Supported: "lax", "strict"
|
*/
'same_site' => null,
];
<?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' => [
resource_path('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' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),
];
<?php
use Illuminate\Support\Str;
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'email_verified_at' => now(),
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => Str::random(10),
];
});
<?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->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
<?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');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}
<?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
// $this->call(UsersTableSeeder::class);
}
}
{
"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": "npm run development -- --watch",
"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 --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="MAIL_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
</php>
</phpunit>
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| 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 great to relax.
|
*/
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| 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.
|
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
This source diff could not be displayed because it is too large. You can view the blob instead.
[{
"id": 2,
"pid": 0,
"name": "用户管理",
"icon": "&#xe697;",
"link": "/member",
"slug": "member.index",
"description": "",
"show": 1,
"sort": 1,
"key_name": "member_manager_block",
"son": [{
"id": 26,
"pid": 2,
"name": "会员列表",
"icon": "",
"link": "/consumer",
"slug": "member.consumer_list",
"description": "",
"show": 0,
"sort": 25,
"key_name": "member_common"
}, {
"id": 91,
"pid": 2,
"name": "查看注册用户信息",
"icon": "",
"link": "/consumer_edit",
"slug": "member.consumer_edit",
"description": "查看注册用户信息",
"show": 0,
"sort": 25,
"key_name": "member_consumer_edit"
}, {
"id": 10,
"pid": 2,
"name": "修改密码",
"icon": "",
"link": "",
"slug": "member.password",
"description": "",
"show": 0,
"sort": 25,
"key_name": "member_modify_pwd"
}, {
"id": 9,
"pid": 2,
"name": "管理员列表",
"icon": "",
"link": "/member",
"slug": "member.manager",
"description": "",
"show": 1,
"sort": 25,
"key_name": "member_manager"
}, {
"id": 8,
"pid": 2,
"name": "会员删除",
"icon": "",
"link": "/member/destroy",
"slug": "member.destroy",
"description": "",
"show": 0,
"sort": 25,
"key_name": "member_destroy"
}, {
"id": 7,
"pid": 2,
"name": "会员启用-停用",
"icon": "",
"link": "/member/disable",
"slug": "member.disable",
"description": "",
"show": 0,
"sort": 25,
"key_name": "member_disable"
}, {
"id": 6,
"pid": 2,
"name": "编辑保存",
"icon": "",
"link": "/member/update",
"slug": "member.update",
"description": "",
"show": 0,
"sort": 25,
"key_name": "member_update"
}, {
"id": 5,
"pid": 2,
"name": "会员编辑",
"icon": "",
"link": "/member/edit",
"slug": "member.edit",
"description": "我是会员编辑",
"show": 0,
"sort": 25,
"key_name": "member_edit"
}, {
"id": 4,
"pid": 2,
"name": "添加保存",
"icon": "",
"link": "/member/store",
"slug": "member.store",
"description": "",
"show": 0,
"sort": 25,
"key_name": "member_add"
}, {
"id": 3,
"pid": 2,
"name": "会员添加",
"icon": "",
"link": "/member/create",
"slug": "member.create",
"description": "",
"show": 0,
"sort": 25,
"key_name": "member_create"
}]
}, {
"id": 11,
"pid": 0,
"name": "媒资管理",
"icon": "&#xe623;",
"link": "/manager",
"slug": "manager",
"description": "",
"show": 1,
"sort": 2,
"key_name": "manager_role_block",
"son": [{
"id": 23,
"pid": 11,
"name": "权限删除",
"icon": "",
"link": "",
"slug": "privilege.destroy",
"description": "",
"show": 0,
"sort": 25,
"key_name": "privilege_destroy"
}, {
"id": 22,
"pid": 11,
"name": "权限添加保存",
"icon": "",
"link": "",
"slug": "privilege.store",
"description": "",
"show": 0,
"sort": 25,
"key_name": "privilege_store"
}, {
"id": 21,
"pid": 11,
"name": "权限修改保存",
"icon": "",
"link": "",
"slug": "privilege.update",
"description": "",
"show": 0,
"sort": 25,
"key_name": "privilege_update"
}, {
"id": 18,
"pid": 11,
"name": "权限编辑",
"icon": "",
"link": "",
"slug": "privilege.edit",
"description": "",
"show": 0,
"sort": 25,
"key_name": "privilege_edit"
}, {
"id": 17,
"pid": 11,
"name": "权限添加",
"icon": "",
"link": "/privilege/create",
"slug": "privilege.create",
"description": "",
"show": 0,
"sort": 25,
"key_name": "privilege_create"
}, {
"id": 16,
"pid": 11,
"name": "权限规则管理",
"icon": "",
"link": "/rule",
"slug": "rule",
"description": "",
"show": 0,
"sort": 25,
"key_name": "rule"
}, {
"id": 15,
"pid": 11,
"name": "媒资列表",
"icon": "",
"link": "/privilege",
"slug": "privilege.index",
"description": "",
"show": 1,
"sort": 25,
"key_name": "privilege_list"
}]
}]
\ No newline at end of file
{"left_list":{"46":{"id":2,"pid":0,"name":"用户管理","icon":"&#xe697;","link":"/member","slug":"member.index","description":"","show":1,"sort":1,"key_name":"member_manager_block","son":[{"id":26,"pid":2,"name":"会员列表","icon":"","link":"/consumer","slug":"member.consumer_list","description":"","show":0,"sort":25,"key_name":"member_common"},{"id":91,"pid":2,"name":"查看注册用户信息","icon":"","link":"/consumer_edit","slug":"member.consumer_edit","description":"查看注册用户信息","show":0,"sort":25,"key_name":"member_consumer_edit"},{"id":10,"pid":2,"name":"修改密码","icon":"","link":"","slug":"member.password","description":"","show":0,"sort":25,"key_name":"member_modify_pwd"},{"id":9,"pid":2,"name":"管理员列表","icon":"","link":"/member","slug":"member.manager","description":"","show":1,"sort":25,"key_name":"member_manager"},{"id":8,"pid":2,"name":"会员删除","icon":"","link":"/member/destroy","slug":"member.destroy","description":"","show":0,"sort":25,"key_name":"member_destroy"},{"id":7,"pid":2,"name":"会员启用-停用","icon":"","link":"/member/disable","slug":"member.disable","description":"","show":0,"sort":25,"key_name":"member_disable"},{"id":6,"pid":2,"name":"编辑保存","icon":"","link":"/member/update","slug":"member.update","description":"","show":0,"sort":25,"key_name":"member_update"},{"id":5,"pid":2,"name":"会员编辑","icon":"","link":"/member/edit","slug":"member.edit","description":"我是会员编辑","show":0,"sort":25,"key_name":"member_edit"},{"id":4,"pid":2,"name":"添加保存","icon":"","link":"/member/store","slug":"member.store","description":"","show":0,"sort":25,"key_name":"member_add"},{"id":3,"pid":2,"name":"会员添加","icon":"","link":"/member/create","slug":"member.create","description":"","show":0,"sort":25,"key_name":"member_create"}]},"50":{"id":11,"pid":0,"name":"权限管理","icon":"&#xe623;","link":"/manager","slug":"manager","description":"","show":1,"sort":2,"key_name":"manager_role_block","son":[{"id":25,"pid":11,"name":"角色删除","icon":"","link":"","slug":"manager.role_del","description":"","show":0,"sort":25,"key_name":"manager_rele_del"},{"id":24,"pid":11,"name":"角色编辑","icon":"","link":"","slug":"manager.role_edit","description":"","show":0,"sort":25,"key_name":"manager_role_edit"},{"id":23,"pid":11,"name":"权限删除","icon":"","link":"","slug":"privilege.destroy","description":"","show":0,"sort":25,"key_name":"privilege_destroy"},{"id":22,"pid":11,"name":"权限添加保存","icon":"","link":"","slug":"privilege.store","description":"","show":0,"sort":25,"key_name":"privilege_store"},{"id":21,"pid":11,"name":"权限修改保存","icon":"","link":"","slug":"privilege.update","description":"","show":0,"sort":25,"key_name":"privilege_update"},{"id":18,"pid":11,"name":"权限编辑","icon":"","link":"","slug":"privilege.edit","description":"","show":0,"sort":25,"key_name":"privilege_edit"},{"id":17,"pid":11,"name":"权限添加","icon":"","link":"/privilege/create","slug":"privilege.create","description":"","show":0,"sort":25,"key_name":"privilege_create"},{"id":16,"pid":11,"name":"权限规则管理","icon":"","link":"/rule","slug":"rule","description":"","show":0,"sort":25,"key_name":"rule"},{"id":15,"pid":11,"name":"权限分类","icon":"","link":"/privilege","slug":"privilege.index","description":"","show":1,"sort":25,"key_name":"privilege_list"},{"id":14,"pid":11,"name":"添加角色","icon":"","link":"/role_add","slug":"manager.role_add","description":"","show":0,"sort":25,"key_name":"manager_role_add"},{"id":13,"pid":11,"name":"角色列表","icon":"","link":"/role","slug":"manager.role","description":"haha","show":1,"sort":25,"key_name":"manager_role"}]}},"cates":[{"id":2,"pid":0,"name":"用户管理","icon":"&#xe697;","link":"/member","slug":"member.index","description":"","show":1,"sort":1,"key_name":"member_manager_block"},{"id":11,"pid":0,"name":"权限管理","icon":"&#xe623;","link":"/manager","slug":"manager","description":"","show":1,"sort":2,"key_name":"manager_role_block"}],"cate_child":{"2":[{"id":26,"pid":2,"name":"会员列表","icon":"","link":"/consumer","slug":"member.consumer_list","description":"","show":0,"sort":25,"key_name":"member_common"},{"id":91,"pid":2,"name":"查看注册用户信息","icon":"","link":"/consumer_edit","slug":"member.consumer_edit","description":"查看注册用户信息","show":0,"sort":25,"key_name":"member_consumer_edit"},{"id":10,"pid":2,"name":"修改密码","icon":"","link":"","slug":"member.password","description":"","show":0,"sort":25,"key_name":"member_modify_pwd"},{"id":9,"pid":2,"name":"管理员列表","icon":"","link":"/member","slug":"member.manager","description":"","show":1,"sort":25,"key_name":"member_manager"},{"id":8,"pid":2,"name":"会员删除","icon":"","link":"/member/destroy","slug":"member.destroy","description":"","show":0,"sort":25,"key_name":"member_destroy"},{"id":7,"pid":2,"name":"会员启用-停用","icon":"","link":"/member/disable","slug":"member.disable","description":"","show":0,"sort":25,"key_name":"member_disable"},{"id":6,"pid":2,"name":"编辑保存","icon":"","link":"/member/update","slug":"member.update","description":"","show":0,"sort":25,"key_name":"member_update"},{"id":5,"pid":2,"name":"会员编辑","icon":"","link":"/member/edit","slug":"member.edit","description":"我是会员编辑","show":0,"sort":25,"key_name":"member_edit"},{"id":4,"pid":2,"name":"添加保存","icon":"","link":"/member/store","slug":"member.store","description":"","show":0,"sort":25,"key_name":"member_add"},{"id":3,"pid":2,"name":"会员添加","icon":"","link":"/member/create","slug":"member.create","description":"","show":0,"sort":25,"key_name":"member_create"}],"11":[{"id":25,"pid":11,"name":"角色删除","icon":"","link":"","slug":"manager.role_del","description":"","show":0,"sort":25,"key_name":"manager_rele_del"},{"id":24,"pid":11,"name":"角色编辑","icon":"","link":"","slug":"manager.role_edit","description":"","show":0,"sort":25,"key_name":"manager_role_edit"},{"id":23,"pid":11,"name":"权限删除","icon":"","link":"","slug":"privilege.destroy","description":"","show":0,"sort":25,"key_name":"privilege_destroy"},{"id":22,"pid":11,"name":"权限添加保存","icon":"","link":"","slug":"privilege.store","description":"","show":0,"sort":25,"key_name":"privilege_store"},{"id":21,"pid":11,"name":"权限修改保存","icon":"","link":"","slug":"privilege.update","description":"","show":0,"sort":25,"key_name":"privilege_update"},{"id":18,"pid":11,"name":"权限编辑","icon":"","link":"","slug":"privilege.edit","description":"","show":0,"sort":25,"key_name":"privilege_edit"},{"id":17,"pid":11,"name":"权限添加","icon":"","link":"/privilege/create","slug":"privilege.create","description":"","show":0,"sort":25,"key_name":"privilege_create"},{"id":16,"pid":11,"name":"权限规则管理","icon":"","link":"/rule","slug":"rule","description":"","show":0,"sort":25,"key_name":"rule"},{"id":15,"pid":11,"name":"权限分类","icon":"","link":"/privilege","slug":"privilege.index","description":"","show":1,"sort":25,"key_name":"privilege_list"},{"id":14,"pid":11,"name":"添加角色","icon":"","link":"/role_add","slug":"manager.role_add","description":"","show":0,"sort":25,"key_name":"manager_role_add"},{"id":13,"pid":11,"name":"角色列表","icon":"","link":"/role","slug":"manager.role","description":"haha","show":1,"sort":25,"key_name":"manager_role"}]}}
\ No newline at end of file
User-agent: *
Disallow:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1024 1024"><defs><linearGradient id="a" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#76C3C3"/><stop offset="100%" stop-color="#183468"/></linearGradient><linearGradient id="b" x1="100%" x2="0%" y1="50%" y2="50%"><stop offset="0%" stop-color="#486587"/><stop offset="33.23%" stop-color="#183352"/><stop offset="66.67%" stop-color="#264A6E"/><stop offset="100%" stop-color="#183352"/></linearGradient><linearGradient id="c" x1="49.87%" x2="48.5%" y1="3.62%" y2="100%"><stop offset="0%" stop-color="#E0F2FA"/><stop offset="8.98%" stop-color="#89BED6"/><stop offset="32.98%" stop-color="#1E3C6E"/><stop offset="100%" stop-color="#1B376B"/></linearGradient><linearGradient id="d" x1="49.87%" x2="49.87%" y1="3.62%" y2="77.75%"><stop offset="0%" stop-color="#B0DDF1"/><stop offset="100%" stop-color="#325C82"/></linearGradient><linearGradient id="e" x1="91.59%" x2="66.97%" y1="5.89%" y2="100%"><stop offset="0%" stop-color="#1D3A6D"/><stop offset="100%" stop-color="#467994"/></linearGradient><linearGradient id="f" x1="97.27%" x2="52.53%" y1="6.88%" y2="100%"><stop offset="0%" stop-color="#1D3A6D"/><stop offset="100%" stop-color="#467994"/></linearGradient><linearGradient id="g" x1="82.73%" x2="41.46%" y1="41.06%" y2="167.23%"><stop offset="0%" stop-color="#1D3A6D"/><stop offset="100%" stop-color="#467994"/></linearGradient><linearGradient id="h" x1="49.87%" x2="49.87%" y1="3.62%" y2="100.77%"><stop offset="0%" stop-color="#B0DDF1"/><stop offset="100%" stop-color="#325C82"/></linearGradient><linearGradient id="i" x1="100%" x2="72.45%" y1="0%" y2="85.2%"><stop offset="0%" stop-color="#1D3A6D"/><stop offset="100%" stop-color="#467994"/></linearGradient><linearGradient id="j" x1="100%" x2="62.1%" y1="0%" y2="68.86%"><stop offset="0%" stop-color="#163055"/><stop offset="100%" stop-color="#2F587F"/></linearGradient><circle id="l" cx="180" cy="102" r="40"/><filter id="k" width="340%" height="340%" x="-120%" y="-120%" filterUnits="objectBoundingBox"><feOffset in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="32"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.696473053 0"/></filter><linearGradient id="m" x1="0%" y1="50%" y2="50%"><stop offset="0%" stop-color="#FFFFFF" stop-opacity="0"/><stop offset="100%" stop-color="#FFFFFF"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><rect width="1024" height="1024" fill="url(#a)"/><g transform="translate(761 481)"><polygon fill="#8DBCD2" points="96 27 100 26 100 37 96 37"/><polygon fill="#8DBCD2" points="76 23 80 22 80 37 76 37"/><polygon fill="#183352" points="40 22 44 23 44 37 40 37"/><polygon fill="#183352" points="20 26 24 27 24 41 20 41"/><rect width="2" height="20" x="59" fill="#183352" opacity=".5"/><path fill="url(#b)" d="M61 0c3 0 3 2 6 2s3-2 6-2 3 2 6 2v8c-3 0-3-2-6-2s-3 2-6 2-3-2-6-2V0z"/><path fill="#8DBCD2" d="M50 20l10-2v110H0L10 28l10-2v10.92l10-.98V24l10-2v12.96l10-.98V20z"/><path fill="#183352" d="M100 26l10 2 10 100H60V18l10 2v13.98l10 .98V22l10 2v11.94l10 .98V26z"/></g><g transform="translate(0 565)"><path fill="url(#c)" d="M1024 385H0V106.86c118.4 21.09 185.14 57.03 327.4 48.14 198.54-12.4 250-125 500-125 90.18 0 147.92 16.3 196.6 37.12V385z"/><path fill="url(#d)" d="M1024 355H0V79.56C76.46 43.81 137.14 0 285 0c250 0 301.46 112.6 500 125 103.24 6.45 166.7-10.7 239-28.66V355z"/><path fill="url(#d)" d="M344.12 130.57C367.22 144.04 318.85 212.52 199 336h649C503.94 194.3 335.98 125.83 344.12 130.57z"/><path fill="url(#e)" d="M0 336V79.56C76.46 43.81 137.14 0 285 0c71.14 0 86.22 26.04 32.5 82-48 50 147.33 58.02 36 136.5-40.67 28.67 21.17 67.83 185.5 117.5H0z"/><path fill="url(#f)" d="M317.5 82c-48 50 147.33 58.02 36 136.5-40.67 28.67 21.17 67.83 185.5 117.5H55L317.5 82z"/><path fill="url(#g)" d="M353.5 218.5C312.83 247.17 374.67 286.33 539 336H175l178.5-117.5z"/><path fill="url(#h)" d="M0 459V264.54c100.25 21.2 167.18 50.29 296.67 42.19 198.57-12.43 250.04-125.15 500.07-125.15 109.75 0 171.47 24.16 227.26 51.25V459H0z"/><path fill="url(#i)" d="M1024 459H846.16c51.95-58.9 48.86-97.16-9.28-114.78-186.64-56.58-101.76-162.64-39.97-162.64 109.64 0 171.34 24.12 227.09 51.19V459z"/><path fill="url(#j)" d="M1024 459H846.19c52.01-59.01 48.94-97.34-9.22-115L1024 397.48V459z"/></g><g transform="translate(94 23)"><use fill="black" filter="url(#k)" xlink:href="#l"/><use fill="#D2F1FE" xlink:href="#l"/><circle cx="123" cy="255" r="3" fill="#FFFFFF" fill-opacity=".4"/><circle cx="2" cy="234" r="2" fill="#FFFFFF"/><circle cx="33" cy="65" r="3" fill="#FFFFFF"/><circle cx="122" cy="2" r="2" fill="#FFFFFF"/><circle cx="72" cy="144" r="2" fill="#FFFFFF"/><circle cx="282" cy="224" r="2" fill="#FFFFFF"/><circle cx="373" cy="65" r="3" fill="#FFFFFF" opacity=".4"/><circle cx="433" cy="255" r="3" fill="#FFFFFF"/><path fill="url(#m)" d="M373.25 325.25a5 5 0 0 0 0-10h-75v10h75z" opacity=".4" transform="rotate(45 338.251 320.251)"/><circle cx="363" cy="345" r="3" fill="#FFFFFF"/><circle cx="513" cy="115" r="3" fill="#FFFFFF"/><circle cx="723" cy="5" r="3" fill="#FFFFFF" opacity=".4"/><circle cx="422" cy="134" r="2" fill="#FFFFFF"/><circle cx="752" cy="204" r="2" fill="#FFFFFF"/><circle cx="672" cy="114" r="2" fill="#FFFFFF"/><circle cx="853" cy="255" r="3" fill="#FFFFFF" opacity=".4"/><circle cx="623" cy="225" r="3" fill="#FFFFFF"/><circle cx="823" cy="55" r="3" fill="#FFFFFF"/><circle cx="902" cy="144" r="2" fill="#FFFFFF"/><circle cx="552" cy="14" r="2" fill="#FFFFFF"/></g><path fill="#486587" d="M796 535a4 4 0 0 1 4 4v20h-8v-20a4 4 0 0 1 4-4z"/><path fill="#071423" d="M798 535.54a4 4 0 0 0-2 3.46v20h-4v-20a4 4 0 0 1 6-3.46zm48-.54a4 4 0 0 1 4 4v20h-8v-20a4 4 0 0 1 4-4z"/><path fill="#8DBCD2" d="M846 559v-20a4 4 0 0 0-2-3.46 4 4 0 0 1 6 3.46v20h-4z"/><g fill="#FFFFFF" opacity=".07" transform="translate(54 301)"><path d="M554.67 131.48a9.46 9.46 0 0 1 13.33 0 9.46 9.46 0 0 0 13.33 0l13.33-13.24a28.39 28.39 0 0 1 40 0l10 9.93a14.2 14.2 0 0 0 20 0 14.2 14.2 0 0 1 20 0l.6.6a31.8 31.8 0 0 1 9.4 22.56H548v-3.84c0-6.01 2.4-11.78 6.67-16.01zM751 8.25c11.07-11 28.93-11 40 0l10 9.94a14.19 14.19 0 0 0 20 0 14.19 14.19 0 0 1 20 0 16.36 16.36 0 0 0 21.3 1.5l8.7-6.47a33.47 33.47 0 0 1 40 0l4.06 3.03A39.6 39.6 0 0 1 931 48H731c0-12.72 8.93-28.75 20-39.75zM14.1 75.14l.9-.9a21.29 21.29 0 0 1 30 0 21.29 21.29 0 0 0 30 0l10-9.93a35.48 35.48 0 0 1 50 0l15 14.9a14.2 14.2 0 0 0 20 0 14.2 14.2 0 0 1 20 0c6.4 6.35 10 15 10 24.02V109H0c0-12.71 5.07-24.9 14.1-33.86z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1024 1024"><defs><linearGradient id="a" x1="50.31%" x2="50%" y1="74.74%" y2="0%"><stop offset="0%" stop-color="#FFE98A"/><stop offset="67.7%" stop-color="#B63E59"/><stop offset="100%" stop-color="#68126F"/></linearGradient><circle id="c" cx="603" cy="682" r="93"/><filter id="b" width="203.2%" height="203.2%" x="-51.6%" y="-51.6%" filterUnits="objectBoundingBox"><feOffset in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="32"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><linearGradient id="d" x1="49.48%" x2="49.87%" y1="11.66%" y2="77.75%"><stop offset="0%" stop-color="#F7EAB9"/><stop offset="100%" stop-color="#E5765E"/></linearGradient><linearGradient id="e" x1="91.59%" x2="66.97%" y1="5.89%" y2="100%"><stop offset="0%" stop-color="#A22A50"/><stop offset="100%" stop-color="#EE7566"/></linearGradient><linearGradient id="f" x1="49.48%" x2="49.61%" y1="11.66%" y2="98.34%"><stop offset="0%" stop-color="#F7EAB9"/><stop offset="100%" stop-color="#E5765E"/></linearGradient><linearGradient id="g" x1="78.5%" x2="36.4%" y1="106.76%" y2="26.41%"><stop offset="0%" stop-color="#A22A50"/><stop offset="100%" stop-color="#EE7566"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><rect width="1024" height="1024" fill="url(#a)"/><use fill="black" filter="url(#b)" xlink:href="#c"/><use fill="#FFF6CB" xlink:href="#c"/><g fill="#FFFFFF" opacity=".3" transform="translate(14 23)"><circle cx="203" cy="255" r="3" fill-opacity=".4"/><circle cx="82" cy="234" r="2"/><circle cx="22" cy="264" r="2" opacity=".4"/><circle cx="113" cy="65" r="3"/><circle cx="202" cy="2" r="2"/><circle cx="2" cy="114" r="2"/><circle cx="152" cy="144" r="2"/><circle cx="362" cy="224" r="2"/><circle cx="453" cy="65" r="3" opacity=".4"/><circle cx="513" cy="255" r="3"/><circle cx="593" cy="115" r="3"/><circle cx="803" cy="5" r="3" opacity=".4"/><circle cx="502" cy="134" r="2"/><circle cx="832" cy="204" r="2"/><circle cx="752" cy="114" r="2"/><circle cx="933" cy="255" r="3" opacity=".4"/><circle cx="703" cy="225" r="3"/><circle cx="903" cy="55" r="3"/><circle cx="982" cy="144" r="2"/><circle cx="632" cy="14" r="2"/></g><g transform="translate(0 550)"><path fill="#8E2C15" d="M259 5.47c0 5.33 3.33 9.5 10 12.5s9.67 9.16 9 18.5h1c.67-6.31 1-11.8 1-16.47 8.67 0 13.33-1.33 14-4 .67 4.98 1.67 8.3 3 9.97 1.33 1.66 2 5.16 2 10.5h1c0-5.65.33-9.64 1-11.97 1-3.5 4-10.03-1-14.53S295 7 290 3c-5-4-10-3-13 2s-5 7-9 7-5-3.53-5-5.53c0-2 2-5-1.5-5s-7.5 0-7.5 2c0 1.33 1.67 2 5 2z"/><path fill="url(#d)" d="M1024 390H0V105.08C77.3 71.4 155.26 35 297.4 35c250 0 250.76 125.25 500 125 84.03-.08 160.02-18.2 226.6-40.93V390z"/><path fill="url(#d)" d="M1024 442H0V271.82c137.51-15.4 203.1-50.49 356.67-60.1C555.24 199.3 606.71 86.59 856.74 86.59c72.78 0 124.44 10.62 167.26 25.68V442z"/><path fill="url(#e)" d="M1024 112.21V412H856.91c99.31-86.5 112.63-140.75 39.97-162.78C710.24 192.64 795.12 86.58 856.9 86.58c72.7 0 124.3 10.6 167.09 25.63z"/><path fill="url(#e)" d="M1024 285.32V412H857c99.31-86.6 112.63-140.94 39.97-163L1024 285.32z"/><path fill="url(#f)" d="M0 474V223.93C67.12 190.69 129.55 155 263 155c250 0 331.46 162.6 530 175 107.42 6.71 163-26.77 231-58.92V474H0z"/><path fill="url(#e)" d="M353.02 474H0V223.93C67.12 190.69 129.55 155 263 155c71.14 0 151.5 12.76 151.5 70.5 0 54.5-45.5 79.72-112.5 109-82.26 35.95-54.57 111.68 51.02 139.5z"/><path fill="url(#g)" d="M353.02 474H0v-14.8l302-124.7c-82.26 35.95-54.57 111.68 51.02 139.5z"/></g><g fill="#FFFFFF" opacity=".2" transform="translate(288 523)"><circle cx="250" cy="110" r="110"/><circle cx="420" cy="78" r="60"/><circle cx="70" cy="220" r="70"/></g><g fill="#FFFFFF" fill-rule="nonzero" opacity=".08" transform="translate(135 316)"><path d="M10 80.22a14.2 14.2 0 0 1 20 0 14.2 14.2 0 0 0 20 0l20-19.86a42.58 42.58 0 0 1 60 0l15 14.9a21.3 21.3 0 0 0 30 0 21.3 21.3 0 0 1 30 0l.9.9A47.69 47.69 0 0 1 220 110H0v-5.76c0-9.02 3.6-17.67 10-24.02zm559.1-66.11l5.9-5.86c11.07-11 28.93-11 40 0l10 9.94a14.19 14.19 0 0 0 20 0 14.19 14.19 0 0 1 20 0 16.36 16.36 0 0 0 21.3 1.5l8.7-6.47a33.47 33.47 0 0 1 40 0l4.06 3.03A39.6 39.6 0 0 1 755 48H555a47.77 47.77 0 0 1 14.1-33.89z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1024 1024"><defs><linearGradient id="a" x1="50.31%" x2="50%" y1="74.74%" y2="0%"><stop offset="0%" stop-color="#E26B6B"/><stop offset="50.28%" stop-color="#F5BCF4"/><stop offset="100%" stop-color="#8690E1"/></linearGradient><linearGradient id="b" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#8C9CE7"/><stop offset="100%" stop-color="#4353A4"/></linearGradient><linearGradient id="c" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#D1D9FF"/><stop offset="100%" stop-color="#8395EB"/></linearGradient><circle id="e" cx="622" cy="663" r="60"/><filter id="d" width="260%" height="260%" x="-80%" y="-80%" filterUnits="objectBoundingBox"><feOffset in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="32"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><linearGradient id="f" x1="49.87%" x2="49.87%" y1="3.62%" y2="77.75%"><stop offset="0%" stop-color="#B0DDF1"/><stop offset="100%" stop-color="#325C82"/></linearGradient><linearGradient id="g" x1="100%" x2="72.45%" y1="0%" y2="85.2%"><stop offset="0%" stop-color="#1D3A6D"/><stop offset="100%" stop-color="#467994"/></linearGradient><linearGradient id="h" x1="49.48%" x2="49.87%" y1="11.66%" y2="77.75%"><stop offset="0%" stop-color="#B9C9F7"/><stop offset="100%" stop-color="#301863"/></linearGradient><linearGradient id="i" x1="91.59%" x2="70.98%" y1="5.89%" y2="88%"><stop offset="0%" stop-color="#2D3173"/><stop offset="100%" stop-color="#7F90E0"/></linearGradient><linearGradient id="j" x1="70.98%" x2="70.98%" y1="9.88%" y2="88%"><stop offset="0%" stop-color="#2D3173"/><stop offset="100%" stop-color="#7F90E0"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><rect width="1024" height="1024" fill="url(#a)"/><g transform="translate(211 420)"><path fill="#8C9CE7" d="M65 0a2 2 0 0 1 2 2v23h-4V2c0-1.1.9-2 2-2z"/><path fill="#5263B8" d="M64 24h2a3 3 0 0 1 3 3v2h-8v-2a3 3 0 0 1 3-3z"/><path fill="url(#b)" d="M65 108h40V68a40 40 0 1 0-80 0v40h40z"/><polygon fill="#2E3D87" points="0 118 30 112 30 218 0 218"/><polygon fill="#301862" points="60 118 30 112 30 218 60 218"/><path fill="url(#c)" d="M45 107V68a40.02 40.02 0 0 1 30.03-38.75C92.27 33.65 105 49.11 105 67.5V107H45z"/><polygon fill="#4353A4" points="15 78 65 68 67 70 67 178 15 178"/><polygon fill="#8C9CE7" points="115 78 65 68 65 70 65 178 115 178"/><polygon fill="#4353A4" points="75 118 105 112 105 218 75 218"/><polygon fill="#8C9CE7" points="135 118 105 112 105 218 135 218"/></g><use fill="black" filter="url(#d)" xlink:href="#e"/><use fill="#FFFFFF" xlink:href="#e"/><g transform="translate(146 245)"><path fill="url(#f)" d="M169.12 450.57C192.22 464.04 143.85 532.52 24 656h649C328.94 514.3 160.98 445.83 169.12 450.57z"/><path fill="url(#g)" d="M178.5 538.5C137.83 567.17 199.67 606.33 364 656H0l178.5-117.5z"/></g><g transform="translate(0 255)"><path fill="url(#h)" d="M1024 685H0V400.08C77.3 366.4 155.26 330 297.4 330c250 0 250.76 125.25 500 125 84.03-.08 160.02-18.2 226.6-40.93V685z"/></g><path fill="#1F2A68" d="M251 506a8 8 0 0 1 8 8v15l-16 1v-16a8 8 0 0 1 8-8z"/><path fill="#7C8CDA" d="M253 506.25a8 8 0 0 0-6 7.75v15.75l-4 .25v-16a8 8 0 0 1 10-7.75z"/><path fill="#1F2A68" d="M251 546a8 8 0 0 1 8 8v15l-16 1v-16a8 8 0 0 1 8-8z"/><path fill="#7C8CDA" d="M253 546.25a8 8 0 0 0-6 7.75v15.75l-4 .25v-16a8 8 0 0 1 10-7.75z"/><path fill="#5263B8" d="M301 506a8 8 0 0 1 8 8v16l-16-1v-15a8 8 0 0 1 8-8z"/><path fill="#293781" d="M305 529.75V514a8 8 0 0 0-6-7.75 8.01 8.01 0 0 1 10 7.75v16l-4-.25z"/><g transform="translate(0 636)"><path fill="url(#h)" d="M1024 356H0V185.82c137.51-15.4 203.1-50.49 356.67-60.1C555.24 113.3 606.71.59 856.74.59 929.52.58 981.18 11.2 1024 26.26V356z"/><path fill="url(#i)" d="M1024 26.21V326H856.91c99.31-86.5 112.63-140.75 39.97-162.78C710.24 106.64 795.12.58 856.9.58c72.7 0 124.3 10.6 167.09 25.63z"/><path fill="url(#i)" d="M1024 199.32V326H857c99.31-86.6 112.63-140.94 39.97-163L1024 199.32z"/></g><circle cx="566" cy="599" r="110" fill="#FFFFFF" opacity=".1"/><circle cx="669" cy="539" r="60" fill="#FFFFFF" opacity=".1"/><g transform="translate(0 705)"><path fill="url(#h)" d="M0 319V68.93C67.12 35.69 129.55 0 263 0c250 0 331.46 162.6 530 175 107.42 6.71 163-26.77 231-58.92V319H0z"/><path fill="url(#i)" d="M353.02 319H0V68.93C67.12 35.69 129.55 0 263 0c71.14 0 151.5 12.76 151.5 70.5 0 54.5-45.5 79.72-112.5 109-82.26 35.95-54.57 111.68 51.02 139.5z"/><path fill="url(#j)" d="M353.02 319H0v-14.8l302-124.7c-82.26 35.95-54.57 111.68 51.02 139.5z"/></g><circle cx="414" cy="799" r="70" fill="#FFFFFF" opacity=".1"/><circle cx="479" cy="745" r="30" fill="#FFFFFF" opacity=".1"/><g fill="#FFFFFF" opacity=".15" transform="translate(49 214)"><path d="M554.67 131.48a9.46 9.46 0 0 1 13.33 0 9.46 9.46 0 0 0 13.33 0l13.33-13.24a28.39 28.39 0 0 1 40 0l10 9.93a14.2 14.2 0 0 0 20 0 14.2 14.2 0 0 1 20 0l.6.6a31.8 31.8 0 0 1 9.4 22.56H548v-3.84c0-6.01 2.4-11.78 6.67-16.01zM751 8.25c11.07-11 28.93-11 40 0l10 9.94a14.19 14.19 0 0 0 20 0 14.19 14.19 0 0 1 20 0 16.36 16.36 0 0 0 21.3 1.5l8.7-6.47a33.47 33.47 0 0 1 40 0l4.06 3.03A39.6 39.6 0 0 1 931 48H731c0-12.72 8.93-28.75 20-39.75zM14.1 75.14l.9-.9a21.29 21.29 0 0 1 30 0 21.29 21.29 0 0 0 30 0l10-9.93a35.48 35.48 0 0 1 50 0l15 14.9a14.2 14.2 0 0 0 20 0 14.2 14.2 0 0 1 20 0c6.4 6.35 10 15 10 24.02V109H0c0-12.71 5.07-24.9 14.1-33.86z"/></g></g></svg>
\ No newline at end of file
<!--
Rewrites requires Microsoft URL Rewrite Module for IIS
Download: https://www.microsoft.com/en-us/download/details.aspx?id=47337
Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
-->
<configuration>
<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>
/*
author: Boostraptheme
author URL: https://boostraptheme.com
License: Creative Commons Attribution 4.0 Unported
License URL: https://creativecommons.org/licenses/by/4.0/
*/
#emails-cont{
padding:0px 40px;
}
.mail-box {
border-collapse: collapse;
border-spacing: 0;
display: table;
table-layout: fixed;
width: 100%;
}
.mail-box aside {
display: table-cell;
float: none;
height: 100%;
padding: 0;
vertical-align: top;
}
.mail-box .sm-side {
background: none repeat scroll 0 0 #fff;
border-radius: 4px 0 0 4px;
width: 19%;
}
.mail-box .lg-side {
background: none repeat scroll 0 0 #fff;
border-radius: 0 4px 4px 0;
width: 75%;
}
a.mail-dropdown {
background: none repeat scroll 0 0 #80d3d9;
border-radius: 2px;
color: #01a7b3;
font-size: 10px;
margin-top: 20px;
padding: 3px 5px;
}
.inbox-body {
padding: 20px;
}
.btn-compose {
background: none repeat scroll 0 0 #00BCD4;
color: #fff;
padding: 12px 0;
text-align: center;
width: 100%;
}
.btn-compose:hover {
background: none repeat scroll 0 0 #00ACB4;
color: #fff;
}
ul.inbox-nav {
display: inline-block;
margin: 0;
padding: 0;
width: 100%;
}
.inbox-divider {
border-bottom: 1px solid #d5d8df;
}
ul.inbox-nav li {
display: inline-block;
line-height: 45px;
width: 100%;
}
ul.inbox-nav li a {
color: #6a6a6a;
display: inline-block;
line-height: 45px;
padding: 0 20px;
width: 100%;
}
ul.inbox-nav li a:hover,
ul.inbox-nav li.active a,
ul.inbox-nav li a:focus {
background: none repeat scroll 0 0 #d5d7de;
color: #6a6a6a;
}
ul.inbox-nav li a i {
color: #6a6a6a;
font-size: 16px;
padding-right: 10px;
}
ul.labels-info li h4 {
color: #5c5c5e;
font-size: 13px;
padding-left: 15px;
padding-right: 15px;
padding-top: 5px;
text-transform: uppercase;
}
ul.labels-info li {
margin: 0;
}
ul.labels-info li a {
border-radius: 0;
color: #6a6a6a;
}
ul.labels-info li a:hover,
ul.labels-info li a:focus {
background: none repeat scroll 0 0 #d5d7de;
color: #6a6a6a;
}
ul.labels-info li a i {
padding-right: 10px;
}
.modal-dialog{
height: 400px;
margin-top: 100px;
}
.nav.nav-pills.nav-stacked.labels-info p {
color: #9d9f9e;
font-size: 11px;
margin-bottom: 0;
padding: 0 22px;
}
.table-inbox {
border: 1px solid #d3d3d3;
margin-bottom: 0;
}
.table-inbox tr td {
padding: 12px !important;
}
.table-inbox tr td:hover {
cursor: pointer;
}
.table-inbox tr td .fa-star.inbox-started,
.table-inbox tr td .fa-star:hover {
color: #f78a09;
}
.table-inbox tr td .fa-star {
color: #d5d5d5;
}
.table-inbox tr.unread td {
background: none repeat scroll 0 0 #f7f7f7;
}
ul.inbox-pagination {
float: right;
}
ul.inbox-pagination li {
float: left;
}
.mail-option {
display: inline-block;
margin-bottom: 10px;
width: 100%;
}
.mail-option .chk-all,
.mail-option .btn-group {
margin-right: 5px;
}
.mail-option .chk-all,
.mail-option .btn-group a.btn {
background: none repeat scroll 0 0 #fcfcfc;
border: 1px solid #e7e7e7;
border-radius: 3px !important;
color: #afafaf;
display: inline-block;
padding: 5px 10px;
}
.mail-option .drop-inbox {
padding:10px;
margin:5px 0px;
box-shadow: 4px 4px 3px #c9c7c7;
}
.mail-option .drop-inbox li {
border-bottom: 1px solid #e7e7e7;
}
.mail-option .drop-inbox li a{
color:#afafaf;
}
.inbox-pagination a.np-btn {
background: none repeat scroll 0 0 #fcfcfc;
border: 1px solid #e7e7e7;
border-radius: 3px !important;
color: #afafaf;
display: inline-block;
padding: 5px 15px;
}
.mail-option .chk-all input[type="checkbox"] {
margin-top: 0;
}
.mail-option .btn-group a.all {
border: medium none;
padding: 0;
}
.inbox-pagination a.np-btn {
margin-left: 5px;
}
.inbox-pagination li span {
display: inline-block;
margin-right: 5px;
margin-top: 7px;
}
.fileinput-button {
background: none repeat scroll 0 0 #eeeeee;
border: 1px solid #e6e6e6;
}
.inbox-body .modal .modal-body input,
.inbox-body .modal .modal-body textarea {
border: 1px solid #e6e6e6;
box-shadow: none;
}
.btn-send,
.btn-send:hover {
background: none repeat scroll 0 0 #00a8b3;
color: #fff;
}
.btn-send:hover {
background: none repeat scroll 0 0 #009da7;
}
.modal-header h4.modal-title {
font-family: "Open Sans", sans-serif;
font-weight: 300;
}
.modal-body label {
font-family: "Open Sans", sans-serif;
font-weight: 400;
}
.heading-inbox h4 {
border-bottom: 1px solid #ddd;
color: #444;
font-size: 18px;
margin-top: 20px;
padding-bottom: 10px;
}
.sender-info {
margin-bottom: 20px;
}
.sender-info img {
height: 30px;
width: 30px;
}
.sender-dropdown {
background: none repeat scroll 0 0 #eaeaea;
color: #777;
font-size: 10px;
padding: 0 3px;
}
.view-mail a {
color: #00BCD4;
}
.attachment-mail {
margin-top: 30px;
}
.attachment-mail ul {
display: inline-block;
margin-bottom: 30px;
width: 100%;
}
.attachment-mail ul li {
float: left;
margin-bottom: 10px;
margin-right: 10px;
width: 150px;
}
.attachment-mail ul li img {
width: 100%;
}
.attachment-mail ul li span {
float: right;
}
.attachment-mail .file-name {
float: left;
}
.attachment-mail .links {
display: inline-block;
width: 100%;
}
.fileinput-button {
float: left;
margin-right: 4px;
overflow: hidden;
position: relative;
}
.fileinput-button input {
cursor: pointer;
direction: ltr;
font-size: 23px;
margin: 0;
opacity: 0;
position: absolute;
right: 0;
top: 0;
transform: translate(-300px, 0px) scale(4);
}
.fileupload-buttonbar .btn,
.fileupload-buttonbar .toggle {
margin-bottom: 5px;
}
.files .progress {
width: 200px;
}
.fileupload-processing .fileupload-loading {
display: block;
}
* html .fileinput-button {
line-height: 24px;
margin: 1px -3px 0 0;
}
*+html .fileinput-button {
margin: 1px 0 0;
padding: 2px 15px;
}
@media (max-width: 767px) {
.files .btn span {
display: none;
}
.files .preview * {
width: 40px;
}
.files .name * {
display: inline-block;
width: 80px;
word-wrap: break-word;
}
.files .progress {
width: 20px;
}
.files .delete {
width: 60px;
}
}
ul {
list-style-type: none;
padding: 0px;
margin: 0px;
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment