bbprojectnet

Results 18 comments of bbprojectnet

Related question, it is possible to define sub relationship of model in schema? For example: user documents I want to define in user schema, documents relationship. User hasOne worker, worker...

I have same issue, I work around it creating the custom action for eloquent resource, for example: ``` $server ->resource('doctors', \App\Http\Controllers\Api\V1\DoctorController::class) ->only('index', 'show', 'update') ->relationships(function (Relationships $relationships) { $relationships->hasOne('user')->only('related', 'show');...

Hi, yes, sure. I'm talking about this feature: https://laraveljsonapi.io/docs/1.0/schemas/attributes.html#attributes-from-related-models which works with hasOne relation, but not with belongsTo (not for create requests).

Eloquent also has `withDefault` for `belongsTo` :) It almost works with laravel json api, related model is created, but without foreign key value i main resource. For now i workaround...

Ok, thanks for the clarification :) > How are you currently loading the data for that? I.e. how are you avoiding n+1 problems? Yes, that would probably be another problem...

@lindyhopchris I have simillar question, it is possible to modify query for some schema relationship (also for includes)? For example, i want to disable soft deletes but only for relationship...

Yes, that's so obvious, I feel stupid for not thinking of it before, thank you very much :)

> Would the expected result be that the link element is resolved to a style element as well on top of the applied styles to the target element? I think...