generated from liutk/owl-admin-base
调整配置接口
parent
ed5ba6edc8
commit
3500b6b5bb
|
|
@ -12,7 +12,15 @@ class SettingController extends ApiController
|
|||
public function info(SettingRequest $request)
|
||||
{
|
||||
$key = $request->input('key', null);
|
||||
|
||||
return $this->success([$key=> settings()->get($key)]);
|
||||
$data = [];
|
||||
// if(strpos(',', $key) !== false){
|
||||
$keys = explode(',', $key);
|
||||
// }
|
||||
foreach($keys as $key){
|
||||
if(!empty($key)){
|
||||
$data[$key] = settings()->get($key);
|
||||
}
|
||||
}
|
||||
return $this->success($data);
|
||||
}
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ class SettingRequest extends FormRequest
|
|||
public function rules()
|
||||
{
|
||||
return [
|
||||
'key' => 'required|string|max:100',
|
||||
'key' => 'required|string|max:255',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ return new class extends Migration
|
|||
$table->string('away_logo')->comment('客场logo');
|
||||
$table->timestamp('game_at')->comment('比赛时间');
|
||||
$table->unsignedTinyInteger('state')->default(0)->comment('状态:0未发布,1已发布,2已公布');
|
||||
$table->unsignedInteger('mark')->comment('分数');
|
||||
$table->unsignedInteger('mark')->default(0)->comment('分数');
|
||||
$table->enum('score', Score::options())->nullable()->comment('比赛结果');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue