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

Your url is the path to the controller file, it should be the route adress

Last updated 2 years ago.
0

you can use the Request::ajax() to make sure that you only response to the ajax requests, and as pmall said, you ajax request must be your route url ( check https://github.com/aaronlord/laroute if you want to use your routes within your javascript files)

Last updated 2 years ago.
0
	if (Request::ajax()) {

		return View::make('class.ajax_new', $data);
	} else {

		return View::make('class.new', $data);
	}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ubilli ubilli Joined 10 Jun 2014

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.