Support the ongoing development of Laravel.io →
Configuration Requests
Last updated 2 years ago.
0

Some questions:

  • Did you get laravel running on XAMMP, WAMP or Homestead first?
  • Did you serve the demo site OK?
  • What happens when you go to http://localhost/welcome ? (or whatever domain you defined)
  • Do you get any javaScript console errors?
0

First off thanks for responding, Mamp is running the demo site is fine, nothing happens I am having a problem with the whole set up. I dont understand how to set it up in laravel. I cant find the steps anywhere

0

Go on YouTube and look at the tutorials on jQuery AJAX by jream. An AJAX post is the same whether you using Laravel, regular PHP Pdo or any framework there's no mysteries there.
Watch those videos.

0

OK, I didn't understand your reponse, due to a lack of punctuation!

Are you running the Mamp demo site OK, but can't run a separate Laravel site?

Last updated 9 years ago.
0

@jimgwhit Thats what I thought that its nothing different. But when I tried the treehouse tutorial it didn't work. I have the code posted at the top of this page. here it is

          <script>
            var xhr = new XMLHttpRequest();
                xhr.onreadystatechange = function(){
                    if (xhr === 4) {
                        document.getElementById('ajax').innerHTML = xhr.responseText;
                    }
                };
                xhr.open('GET', 'welcome');
                xhr.send();
           </script>

welcome is refers to this

                Route::get('welcome', 'WelcomeController@index');

shouldn't it work like this?

I will watch the suggested videos.

and @davestewart everything is set up and working except for the ajax

Last updated 9 years ago.
0

@idesignedme, see my reply after @jimgwhit's on the link he posted.

0

Forget about some tree house tutorial watch the videos I referenced to you that has very thorough videos.

0

If you know how to use ajax in html/php, there's no difference when using it on laravel. Good thing is you can use Laravel's route() helper so the url on your ajax will get the correct path.

0

thank you all for your respnses. I was just thrown off by how it was explained and I have got it to work. Now I'm on to JSON and am wondering how you display it. Would like some info on that.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.