skip to Main Content

how to understand this sentence in laravel

Im trying to understand what the sentence $request->user()?->id ?: $request->ip() does in this function protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); }); } According to my understanding it will limit the rate attempts to…

VIEW QUESTION
Back To Top
Search