N
N
NikSIk312019-12-07 23:14:13
Laravel
NikSIk31, 2019-12-07 23:14:13

Laravel appends and broadcasts?

Good day!
there is such a code

public function getCostAttribute() {
        if(Auth::user()->isExecutor()) {
            return $this->executor_cost;
        }
        return $this->customer_cost;
    }

It adds cost depending on the role.
If you just load the page, then the cost adds OK. Those. if the executor loads, then we get the cost for the executor
BUT, if it broadcasts and the broadcast triggers the executor, then the cost for the executor BUT I always broadcast to another role. Those. I need to get the cost for customer when broadcasting FROM executor. How can this be achieved?
Or is it possible to kill this appendix in a certain place, how?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question