mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
96d3a27a5b
commit
34fa75b4cc
@ -18,7 +18,9 @@ class TutorialController extends Controller
|
||||
public function save (TutorialSave $request) {
|
||||
$params = $request->only([
|
||||
'title',
|
||||
'description'
|
||||
'description',
|
||||
'steps',
|
||||
'icon'
|
||||
]);
|
||||
|
||||
if (!$request->input('id')) {
|
||||
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use App\Models\Tutorial;
|
||||
|
||||
class TutorialController extends Controller
|
||||
{
|
||||
@ -32,4 +33,8 @@ class TutorialController extends Controller
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
public function fetch (Request $request) {
|
||||
$tutorial = Tutorial::select(['title', 'description', 'icon'])->get();
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ class TutorialSave extends FormRequest
|
||||
return [
|
||||
'title' => 'required',
|
||||
'description' => 'required',
|
||||
'icon' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
@ -24,6 +25,7 @@ class TutorialSave extends FormRequest
|
||||
return [
|
||||
'title.required' => '标题不能为空',
|
||||
'description.required' => '描述不能为空',
|
||||
'icon.required' => '图标不能为空'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user