python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Soft deleted instance is not retrieved by Laravel Resource
I have two models related to each other with a one-to-one relationship.
Model A belongs to model B and when an instance of model B is returned to the frontend, the Resource of the model B includes the...

Wesley Gonçalves
Votes: 0
Answers: 1
Laravel API resource paginate sub data
I'm trying to understand Laravel API resource and would like to know how I could use pagination with a subset of my data. For example: I have a book model and to return all the books available I could...
mnlixk
Votes: 0
Answers: 1
Laravel groupBy in collection not working
I am trying to group the result with the status name inside. I am not doing groupBy after collection because I am using resource to return data, there are some logic inside resource. Grouping data bef...
fanaliya
Votes: 0
Answers: 1
Why do we we pass $request to toArray() if we dont use it?
I am new to Laravel. I am currently building a resource. I was just wondering what is the purpose of passing in the $request object if we use the $this variable when using resources. Below is an examp...
json2021
Votes: 0
Answers: 0