我如何解决未定义的方法错误

How can i solve an undefined method error

我的 laravel 9.1 出现错误:

public function index()
    {
  $fingers = fingerprint:: latest()->paginate(15);
return view('crud.fliste', compact('fingers'))
      ->with('i', (request()->input('page', 1) - 1) * 15);
      }
    public function create()
    {
      return view('crud.fekle');
    }

    public function store(Request $request)
    {
    $request->validate(['kisiadi' => 'required']);
        fingerprint::create($request->all());
        return redirect()->route('fingerprint.index')
            ->with('success', 'parmak izi ekleme işlemi başarılı.');
  

我正在尝试一些事情,但我无法解决这个问题。我尝试了一些东西;我删除了“{,}”,我编辑了语法,但我仍然遇到错误。你们能帮帮我吗?

你是不是在 store() 方法中缺少右花括号?

public function store(Request $request)
{
    $request->validate(['kisiadi' => 'required']);
    fingerprint::create($request->all());
    
    return redirect()->route('fingerprint.index')
        ->with('success', 'parmak izi ekleme işlemi başarılı.');
}

你只是少了花括号。请检查以下代码:

  public function index(){
    $fingers = fingerprint:: latest()->paginate(15);
    return view('crud.fliste', compact('fingers'))->with('i', (request()->input('page', 1) - 1) * 15);
}

public function create()
{
    return view('crud.fekle');
}

public function store(Request $request)
{
    $request->validate(['kisiadi' => 'required']);
    fingerprint::create($request->all());
    return redirect()->route('fingerprint.index')->with('success', 'parmak izi ekleme işlemi başarılı.');
}