Answer the question
In order to leave comments, you need to log in
Link and page not working due to Laravel localization?
I implemented site localization, created a group for paths, gave a prefix, created middleware, in general, everything worked before I got to the page where I display cards of all tests from the database, I display a link on each card with the path {language}/test/{ test}, on all links I had a static value, most likely because of this, there are no errors on other pages. I have a path:
Route::group(['prefix' => '{language}', 'where' => ['language' => 'ru|en']], function () {
//other route
Route::middleware(['auth:sanctum', 'verified'])
->resource('/test', TestController::class)
->name('*', 'test')
});
public function show(Test $test, TestRepository $testRepository)
{
$i = 0;
$name = 0;
$testQues = $testRepository->getTestId($test);
$testCollect = $testRepository->getTest($test);
return view('test.show', compact('testQues', 'testCollect', 'i', 'name'));
}
<a href="{{ route('test.show', $testsCard->id, app()->getLocale()) }}"><x-jet-button>Начать</x-jet-button></a>
<a href="{{ route('test.index', app()->getLocale()) }}"></a>
Illuminate\Routing\Exceptions\UrlGenerationException
Missing required parameter for [Route: test.show] [URI: {language}/test/{test}] [Missing parameter: test]. (View: C:\xampp\htdocs\jetstream\resources\views\livewire\test\card.blade.php)
Answer the question
In order to leave comments, you need to log in
$('."history_title:contains("купил монеты через")') // заголовки блоков, в которых есть подстрока "купил монеты через"
.each(function(){
var block = $(this).closest('.history')
var balance = block.find('.balance_plus').text()
var datetime = block.find(':contains("Время")').next().text() // если они всегда так расположены
console.log(balance, datetime)
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question