New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NO Causer Id when use deleted #597
Comments
|
Hey, first of all the model that gets deleted is $product->product_details->each->delete();Or you log it as a single activity and use a custom activity via |
oh sorry sir, I've put the wrong code. This is my delete for the product. $product = Products::findOrfail($id);
$product->delete(); |
|
And do you call it in a controller with a logged in user? Or somewhere in a queue, console command? |
as you can see sir, didnt work in updated too when i Update the user, |
|
I meant do you call the laravel-activitylog/src/ActivityLogger.php Lines 189 to 200 in 89bbdbe
This method is responsible to set the default causer. If you add a dd($this->auth->guard($this->authDriver)->user()); in the if you can see which user is resolved by the used guard.If it's null there the problem is in your auth procedure.
|
I call it in my Controller sir. |
|
Dear contributor, because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it. |
|
ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh i get it now ....so i was using api to create and update from salesforce which doesn't come under auth that's way i was getting causer_type and causer_id null. |
you can set the logged-in user as the cause |

this is my Product Model
this is my delete function
$products->product_details()->delete();The text was updated successfully, but these errors were encountered: