I'll try to explain. Here in the blade for information is the checkbox for late signups
<tr>
<td>{{_('Allow late signup')}}</td>
<td>
<label for="allow_signups_after_closing_date">
<input type="checkbox" ng-model="competitions.competition.allow_signups_after_closing_date" id="allow_signups_after_closing_date" ng-true-value="1" ng-false-value="0"> {{_('Tillåt anmälan efter sista-HÄR anmälningsdag')}}</a>
</label>
</td>
</tr>
So if that box is checked the system comes into a loop when being in the competition blade where you can see
the competitions.
If I do this:
public function getAllowSignupsAfterClosingDateHumanAttribute()
{
if(!$this->allow_signups_after_closing_date):
return _('Not allowed');
/* elseif($this->allow_signups_after_closing_date && $this->approval_signups_after_closing_date):
return _('Needs approval. %s kr fee', $this->price_signups_after_closing_date);
elseif($this->allow_signups_after_closing_date && !$this->approval_signups_after_closing_date):
return _('Late signup possible. %s kr fee', $this->price_signups_after_closing_date).
*/
endif;
}
I can see the competitions. So something in these statements are causing error. .
I got an error also in laravel.log:
[2022-04-22 23:45:01] local.ERROR: _() expects exactly 1 parameter, 2 given {"userId":7,"exception":"[object] (ErrorException(code: 0): _() expects exactly 1 parameter, 2 given at /Users/ralph/laravel8/webshooter_web/app/Models/Competition.php:284)
[stacktrace]
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, '_() expects exa...', '/Users/ralph/la...', 284, Array)
#1 /Users/ralph/laravel8/webshooter_web/app/Models/Competition.php(284): _('Needs approval....', 100)