vendredi 6 mars 2020

how to passing data to other function laravel 6

I am having trouble sending data in the form of ID from one function to another using laravel, here is my code but it doesn't work with an undefined variable error

 public function createPesanan()
{
   $survey->save();
   $id_survey = $survey->id;
   $this->listPesanan($id_survey);
   return redirect('user/list-pesanan')->with('status', 'Pesanan Survey Anda Berhasil di tambahkan');
}


  public function listPesanan()
    {
       $survey = Survey::find($id_survey);
       dd($survey);
    }


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32Vvhds
via IFTTT

1 commentaire:

  1. Let me tell you something...

    What I'm going to tell you might sound really creepy, and maybe even kind of "strange"

    BUT what if you could just hit "PLAY" and LISTEN to a short, "miracle tone"...

    And magically attract MORE MONEY to your LIFE??

    What I'm talking about is thousands... even MILLIONS of DOLLARS!!!

    Do you think it's too EASY?? Think something like this is not for real??

    Well then, I'll be the one to tell you the news..

    Sometimes the most magical blessings life has to offer are the SIMPLEST!!!

    Honestly, I'm going to provide you with PROOF by letting you PLAY a REAL "miracle money-magnet tone" I've produced...

    And TOTALLY FOR FREE

    You just press "PLAY" and watch how money starts piling up around you. starting pretty much right away.

    CLICK here to experience the magical "Miracle Wealth Building Sound Frequency" as my gift to you!!!

    RépondreSupprimer