Skip to content
Permalink
Browse files

优化安装问题

  • Loading branch information...
WangNingkai committed Jun 17, 2019
1 parent 61cc72a commit 862a9b5aebecfcdccef0bc35d5aabd0b52abf6f9
@@ -6,7 +6,7 @@ APP_URL=http://localhost:8000

LOG_CHANNEL=daily

#sqlite/myysql
#sqlite/mysql
DB_CONNECTION=sqlite
#DB_HOST=127.0.0.1
#DB_PORT=3306
@@ -5,7 +5,7 @@
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2019-06-14 21:42:35.
* Generated on 2019-06-15 17:05:50.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
@@ -3,7 +3,7 @@
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.8.23 on 2019-06-14 21:42:35.
* Generated for Laravel 5.8.23 on 2019-06-15 17:05:49.
*
* This file should not be included in your code, only analyzed by your IDE!
*
@@ -46,16 +46,16 @@ public function handle()
$this->info('chmod -R 755 storage/* && chown -R www:www *');
// sqlite数据库文件检测
if (!file_exists(base_path('database/database.sqlite'))) {
$this->warn('Missing the Database File.');
$this->warn('Database file missing .');
copy(
base_path('database/database.sample.sqlite'),
base_path('database/database.sqlite')
);
$this->info('Done!');
$this->info('Coping the database file.');
}
// 执行数据迁移
if (!file_exists(base_path('.env.example'))) {
$this->warn('No [.env.example] File,please make sure the project complete!');
$this->warn('[.env.example] file missing,Please make sure the project complete!');
exit;
}
$app_url = $this->ask('Bind Domain(For Authorize)');
@@ -80,15 +80,19 @@ public function handle()
}
// 生成配置缓存否则报错
$this->call('config:cache');
DB::table('users')->truncate();
$this->callSilent('config:cache');
$this->call('migrate');
/*DB::table('users')->truncate();
DB::table('settings')->truncate();*/
// 初始化用户
DB::table('users')->updateOrInsert([
'name' => 'admin',
'email' => 'admin@admin.com',
'password' => bcrypt('12345678'),
]);
$this->callSilent('config:cache');
$this->warn('username:[ admin ] email:[ admin@admin.com ] password:[ 12345678 ]');
$this->warn('All Done!');
@@ -51,8 +51,7 @@ public function handle()
public function reset()
{
$this->call('cache:clear');
DB::table('settings')->truncate();
DB::table('users')->truncate();
$this->callSilent('migrate:reset');
$this->info('Reset Completed!');
}
}
@@ -63,6 +63,10 @@ class GraphRequest
* @var $responseError
*/
protected $responseError;
/**
* @var bool
*/
public $error = false;
/**
@@ -29,7 +29,12 @@ function is_json($json)
function setting($key = '', $default = '')
{
$setting = \Cache::remember('setting', 60 * 60, static function () {
$setting = Setting::all()->toArray();
try {
$setting = Setting::all()->toArray();
} catch (Exception $e) {
return [];
}
$data = [];
foreach ($setting as $detail) {
$data[$detail['name']] = $detail['value'];
BIN +0 Bytes (100%) database/database.sample.sqlite
Binary file not shown.
@@ -141,7 +141,7 @@ chown -R www:www *
推荐使用 `supervisor` 管理守护任务

```
php artisan queue:word database --queue=olaindex --tries=3
php artisan queue:work database --queue=olaindex --tries=3
```

## 缓存配置
@@ -34,8 +34,6 @@

- 确保执行 `chmod``chown` 此处两个命令,解决目录权限问题

- 确保执行 `chmod 777 storage/app/config.json` 此命令,解决配置权限问题

- 不知情的情况,请勿修改文件

- 其他情况,请在issue中提交最新log报错代码,位置 `storage/logs/laravel.log`\

0 comments on commit 862a9b5

Please sign in to comment.
You can’t perform that action at this time.