I'm very stuck with an error that i can't understand, Laravel 8 response always "flock() expects parameter 1 to be resource, bool given" In all api routes. I made a simple route to debug this issue but i'm not have a little idea what the problem is, so if someone could get me some help about this i'll be would be great.
This is my code:
API Routes
Route::post('/createUser',[UserController::class, 'store'])->name('createUser');
Route::get('/getUser',[UserController::class, 'index'])->name('getUser');
Route::middleware(['auth:sanctum'])->group(function () {
Route::prefix('V1')->group(function () {
// Rutas para los VDP
Route::get('/conf',[ReaderController::class, 'readerInitialConf'])->name('readerInitialConf');
Route::post('/createReader',[ReaderController::class, 'store'])->name('createReader');
});
});
Controller Code:
public function index()
{
return User::all();
}
And this is Postman:
Note: This application is dockerized, I don't know if docker might cause this problem, but i think not, because i always use it and never get this problem.
If someone could help, i'll be very thankfull.
Thanks in advance! Raul
