I'm wondering what is the difference between:
Route::post('insert/{slug}/{page_number}/{person_type_id}/{user_id}', function($slug) { return Response::json( [ 'success' => false, 'slug' => $slug ]); });
and this: Route::post('{slug}/users/page/{page_number}/insert-ben/{person_type_id}/user/{user_id}', 'PersonsController@insertBen');
The first one works. The latter used to work but it's no longer working now. I tried stepping through the code and the latter ends up going to the UsersController@login rather than to PersonsConroller@insertBen. So odd. This was working about a month ago. I'm trying to see what I changed with my version control but it's so strange that it's not working all of a sudden.
My posts are working fine as I can login and the UsersController@doLogin is being called.
I even tested with this call: Route::post('{slug}/users/page/{page_number}/insert-ben/{person_type_id}/user/{user_id}', 'UsersController@insertTest');
/controllers/UsersController.php
public function insertTest($slug)
{
if ( Request::ajax() ) {
return Response::json( [
'success' => false,
'slug' => $slug
] );
}
}
But the UsersController@insertTest doesn't work either. My PersonsController is working fine as I can update using this controller. So what could be the problem? Anyone encounter something similar?
Much thanks and God bless<><, Victor
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community