"Call to undefined function App\Http\Controllers\requests()" .. Requests folder missing
Hello guys,
i'm starting with Laravel with Laravel From Scratch tutorial. I get stuck on forms. Everything i have as it is on tutorial but i notice that i have not Requests folder in my folder structure. Can you help me please why is that or what i did wrong. Thanks
Hello. I follow Laravel From Scratch tutorial exactly. Here is code from my NotesController.php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class NotesController extends Controller
{
public function store()
{
return requests()->all();
}
}```
I created request through php artisan and Request folder is now there. I see that error because function request() does not exist anywhere. I think this had to be in request folder already.
Now i get: "FatalErrorException in NotesController.php line 16:
Function name must be a string"
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class NotesController extends Controller
{
public function store(Request $request)
{
return $request()->all();
}
}