Answer the question
In order to leave comments, you need to log in
How to understand what could be the problem? if! doesn't work?
Hey! They asked me to help solve problems, and for three days now I have been in a stupor. Laravel project. After registration, the user must leave three reviews about different restaurants. For this, three routes and three companies were made (I don’t know why).
Route::get('/post-review-one', '[email protected]');
Route::get('/post-review-two', '[email protected]');
Route::get('/post-review-three', '[email protected]');
Route::post('/back-end/api/add-review/signup-finish', '[email protected]_validate');
Route::post('/back-end/api/add-review/signup-finish/two', '[email protected]_validate');
Route::post('/back-end/api/add-review/signup-finish/three', '[email protected]_validate');
// Код проверки первого роута
return redirect('/post-review-two');
// Это из проверки второго
$first_review_rid = Request::get('review_rid_1');
if($param['restaurant_id'] != $first_review_rid) {
$addReview = $reviewsModel->addReview($param);
// Define current step and make redirect to the next step
return redirect('/post-review-three');
} else {
return redirect('/already-posted/2');
}
//а то из трутьего
$first_review_rid = Request::get('review_rid_1');
$second_review_rid = Request::get('review_rid_2');
if($param['restaurant_id'] != $first_review_rid && $param['restaurant_id'] != $second_review_rid) {
$addReview = $reviewsModel->addReview($param);
// Define current step and make redirect to the next step
return redirect('/upload-image');
} else {
return redirect('/already-posted/3');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question