How not to move on the route but to fulfill it?

Good day gentlemen :)
There are 4 buttons
<h2>Manage virtual life</h2> <br / > <div class="ramkaleft"> <br / > <form action="/startvirtuallive" method="get"> <button type="submit" class="btn btn-success">Start fertility</button> </form> <br / > <form action="/startvirtuallivekiller" method="get"> <button type="submit" class="btn btn-success">Run deaths</button> </form> </div> <div class="ramkaright"> <br / > <form action="/stopvirtuallive" method="get"> <button type="submit" class="btn btn-danger">Stop fertility</button> </form> <br / > <form action="/stopvirtuallivekiller" method="get"> <button type="submit" class="btn btn-danger">Stop mortality</button> </form> </div>
which operate on these routes:
Route::get('/startvirtuallive', 'MainController@startvirtuallive');
Route::get('/startvirtuallivekiller', 'MainController@startvirtuallivekiller');
Route::get('/stopvirtuallive', 'MainController@stopvirtuallive');
Route::get('/stopvirtuallivekiller', 'MainController@stopvirtuallivekiller');

The first two routes work out and start a blank page for this route, and 3 and 4 route open a new blank page. In the same page..

UPD
Methods in the controller:
class MainController extends Controller
{
 public function startvirtuallive()
{
$this->virtuallive(true);

}
 public function startvirtuallivekiller()
{
$this->virtuallivekiller(true);

}

 public function stopvirtuallive()
{
$this->virtuallive(false);

}
 public function stopvirtuallivekiller()
{
$this->virtuallivekiller(false);

}
 public function virtuallivekiller($virtual_livekiller = true)
{
 if ($virtual_livekiller != false)
{
DB::table('virtuallive')
 ->where('id', 1)
 ->update(['livekiller' => 1]);
}
 if ($virtual_livekiller != true)
{
DB::table('virtuallive')
 ->where('id', 1)
 ->update(['livekiller' => 0]);
}
 while ($virtual_livekiller == true)
{
 $live = DB::table('virtuallive')->get();
 foreach($live as $animal)
{
 $now = $animal->livekiller;
}
 if($now == 1)
{
 DB::select('CALL fixid();');
 if(DB::table('zagon_all')->where('id', '=', 1)->delete() == true)
{

DB::table('zagon_dead')->insert(
 ['idanimal' => 1]
);
 DB::select('CALL fixid();');
}
sleep(1);
}
else
{
break;
}

}
}
 public function virtuallive($virtual_live = true)
{
 if ($virtual_live != false)
{
DB::table('virtuallive')
 ->where('id', 1)
 ->update(['live' => 1]);
}
 if ($virtual_live != true)
{
DB::table('virtuallive')
 ->where('id', 1)
 ->update(['live' => 0]);
}
 while ($virtual_live == true) {
 $live = DB::table('virtuallive')->get();
 foreach($live as $animal)
{
 $now = $animal->live;
}
 if($now == 1){
 DB::table('zagon_all')-> insertGetId(
[]
);
 DB::select('CALL fixid();');
sleep(10);
}
else
{
break;
}

}
}
}

What's the problem?


Recorded a video, which showed visually what the problem is:
https://www.youtube.com/watch?v=f2Fuy9If3gE&featur...
June 26th 19 at 14:04
2 answers
June 26th 19 at 14:06
Solution
The fact that nothing shows on the page is correct, you have written nothing to show. To see, to do a return view(...) , and you have the controllers just call the method and everything.

The first two methods also return nothing, they just you have to focus on code while ($virtual_live == true) new content on the page does not come, and it seems that the page pererisovyvali. Really just an http request is not finished - please note on the Twister chrome in tab.

You need to do return reditect(...) on the page that draws the original image.
Thanks for the help :) - Morris.Rodrigu commented on June 26th 19 at 14:09
June 26th 19 at 14:08
In General.
This question is from "Troll". HE doesn't want even the basics to learn and manuals to read, and all the spam on the toaster daily very stupid questions.
Do not get fooled. :)
What? You really are confusing , since you can not help,past,why do you spend time on trolls ? Logic ... - Morris.Rodrigu commented on June 26th 19 at 14:11

Find more questions by tags LaravelPHP