Skip to content

Commit

Permalink
5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
WangNingkai committed Mar 28, 2020
1 parent 3bb0038 commit 5c294f0
Show file tree
Hide file tree
Showing 266 changed files with 2,766 additions and 17,317 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ THEME=default

# php 路径
PHP_PATH=

9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
/public/hot
/public/storage
/storage/*.key
/public/favicon.ico
/vendor
/.idea
/.vscode
/.vagrant
.env
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
.phpunit.result.cache
/frontend
.php_cs.cache
_ide_helper.php
.phpstorm.meta.php
13 changes: 13 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
php:
preset: laravel
disabled:
- unused_use
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
css: true
17 changes: 2 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![GitHub forks](https://img.shields.io/github/forks/WangNingkai/OLAINDEX.svg?style=flat-square)](https://github.com/WangNingkai/OLAINDEX/network)
[![GitHub license](https://img.shields.io/github/license/WangNingkai/OLAINDEX.svg?style=flat-square)](https://github.com/WangNingkai/OLAINDEX/blob/master/LICENSE)

<div align=center><img alt="OLAINDEX" src="https://i.loli.net/2019/06/15/5d049d72309c376133.png"/></div>
<div align=center><img alt="OLAINDEX" src="https://ojpoc641y.qnssl.com/FoO82Ql-AAn6TPIUa7RtbgWCPihl.png"/></div>


> 👋 本项目受 Oneindex 启发,借鉴其部分功能,在这里感谢。 项目持续开发,会加入更多功能,欢迎大家提交 issue.
Expand Down Expand Up @@ -70,18 +70,7 @@ chown -R www:www *

本次更新进行部分重构,不再兼容老版本,请删除原先代码重新拉取部署更新

**2019.06 v4.0**

1. 搜索功能增强(前台可搜索、后台设置搜索频次)
2. 目录额外功能优化(文件隐藏、加密)
3. 文件排序功能加强
4. 静态资源CDN更换
5. 路径优化(可自定义兼容模式)
6. 后台刷新任务执行
7. 整合部分命令
8. 上传、搜索频次设置
9. 更换信息存储为数据库存储
10. 添加第三方接口
**2020.04 v5.0**

### 分支说明

Expand Down Expand Up @@ -121,8 +110,6 @@ Email [[email protected]](mailto:[email protected])

项目开发纯属个人爱好,如果你喜欢此项目,欢迎赞助。

同时赞助可以获得一次安装技术服务。

另可根据需求提供付费定制服务。

**赞助地址 : [https://pay.ningkai.wang](https://pay.ningkai.wang)**
Expand Down
1 change: 0 additions & 1 deletion app/Console/Commands/.gitignore

This file was deleted.

87 changes: 87 additions & 0 deletions app/Console/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class InstallCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'install';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Install App';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle(): void
{
// step 1
$canWritable = is_writable(storage_path());
if (!$canWritable) {
$this->warn('Please make sure the [storage] path can write!');
}
$lockFile = install_path('install.lock');
if (file_exists($lockFile)) {
$this->warn('Already Installed!');
exit;
}

// step 2
$envSampleFile = base_path('.env.example');
$envFile = base_path('.env');
if (!file_exists($envSampleFile)) {
$this->warn('[.env.example] file missing,Please make sure the project complete!');
exit;
}
$_search = [
'APP_KEY=',
];
$_replace = [
'APP_KEY=' . str_random(32),
];
$envExample = file_get_contents($envSampleFile);
$env = str_replace($_search, $_replace, $envExample);
if (file_exists($envFile)) {
if ($this->confirm('Already have [.env] ,overwrite?')) {
@unlink($envFile);
file_put_contents($envFile, $env);
}
} else {
file_put_contents($envFile, $env);
}

// step 3
$this->call('config:cache');

// step 4
$sqlFile = install_path('data/database.sqlite');
$sqlSampleFile = install_path('data/database.sample.sqlite');
if (!file_exists($sqlSampleFile)) {
$this->warn('[database.sample.sqlite] file missing,Please make sure the project complete!');
exit;
}
if (!file_exists($sqlFile)) {
$this->warn('Database not found,Creating...');
copy($sqlSampleFile, $sqlFile);
}
$this->call('migrate');
$this->call('db:seed');
file_put_contents($lockFile, '');
$this->call('config:cache');
$this->info('default name: [ admin ]');
$this->info('default password: [ 123456 ]');
$this->info('Install Complete!');
}
}
91 changes: 0 additions & 91 deletions app/Console/Commands/OneDrive/Copy.php

This file was deleted.

48 changes: 0 additions & 48 deletions app/Console/Commands/OneDrive/CreateFolder.php

This file was deleted.

50 changes: 0 additions & 50 deletions app/Console/Commands/OneDrive/Direct.php

This file was deleted.

Loading

0 comments on commit 5c294f0

Please sign in to comment.