The first time I observed the issue I thouhgt the Vue frontend was broken but as I examined the XHR requests I noticed that the problem wasn't in the Vue app. In the returned data JSON there were 2 duplcate ids. I've now experienced this a few times and I've noticed that it happens when a user delet...
I'm developing a Laravel application with an API in which users have roles and roles have permissions. Currently I'm trying to assign a permission to a role, but I don't really know how to do it as the GET request to the API returns a JSON resource which I can't use to access the many-to-many relati...
How should I test image file upload to my API? I tried using faker to provide me with an image in the feature test but it doesn't work. The test would freeze and after a while when I dd($this->image); it would say false. This is my code:$this->image = $this->faker->image($dir = base_path('tests\Feat...
Hi, When I'm trying to $response->assertJsonCount(2); I get Failed asserting that actual size 1 matches expected size 2. My controller index method returns ExampleResource::collection(ExampleModel::all()); which has the necessary data in it for the 2 records I have. How can I assert the count of the...
I have the same laptop. I'm using nvidia-dkms + optimus-manager and everything works okay.
Thank you for taking the trouble to help me. I appreciate it. I'll follow your advice to see if I can find the problem.
Thanks for the response! Yes, my post is a bit vague but I already solved my problem as other comments gave me an idea of what to do.
Thank you!
Is it ok to write additional policies to check for example if a user can view all records or only the ones that belong to them?