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?
CodePudding user response:
Aren't you missing the closing curly brace in the store method ?
CodePudding user response:
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ı.');
}