PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, April 20, 2022

[FIXED] How can i solve an undefined method error

 April 20, 2022     laravel, laravel-9     No comments   

Issue

my laravel 9.1 is getting error:

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ı.');
  

i am trying something, but i cannot solve this. I tried something; i deleted "{,}", i edited syntax but i am still geting error. can you guys help me?


Solution

You are just missing the curly brace. Please check the following code below:

  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ı.');
}


Answered By - Dip Ghosh
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing