Route::resource('dashboard/aboutus', 'AboutUsController'); // Resouce to view and update Contact Us information. Route::resource('dashboard/contactus', 'ContactUsController'); // Update User Information section ********************** Route::get('profile', function () { $username = Auth::user()->username; $user = User::find(Auth::user()->id); return View::make('user.profile', ['username' => $username, 'user' => $user])->withTitle('Edit User Profile'); }); Route::post('profile/update/{id}', ['uses' => 'UserController@updateProfile']); // End Update User Information section ****************** // API for jQuery to display breeds based on specie selected. Route::get('breed-based-on-specie', function () { $species_id = Input::get('species_id'); // Get breeds for specie selected. $breeds = Breed::where('species_id', '=', $species_id)->orderBy('name')->get(); // Return data as Json. return Response::json($breeds); }); }); /* --------------------------- END ADMIN ROUTES ------------------------- */ /* ----------------------- ANGULAR.JS API ROUTES ------------------------ */ Route::group(['prefix' => 'client_api'], function () { Route::get('all_animals', 'ClientApiController@AllAnimals'); Route::get('all_dogs', 'ClientApiController@AllDogs'); Route::get('all_cats', 'ClientApiController@AllCats'); Route::get('events', 'ClientApiController@AllEvents'); Route::post('subscribe', 'ClientApiController@subscribeToNewsletters'); Route::get('aboutus', 'ClientApiController@aboutUs'); Route::get('contactus', 'ClientApiController@contactUs'); Route::get('{animal}', 'ClientApiController@AnimalData');