I'm not sure I'm asking the right questions, but this is what I'm trying to do.
So we can get current from
$model = Model::find($id)
Then we can get relationships such as:
$model->relationships()->id
Then we have such actions as:
$model->relationships()->detach(4);
My question is: can we create our own method:
$model->relationships()->customMethod($params);
and in the model it might look like this:
public function customMethod($params){
But more than that, how customMethod I get $models information as id in customMethod ?
Sorry if this can be a bit confusing.
source share