That's pretty static. you should try to make it more dynamic like so:
On ROutes:
Route::get('status/{status}', 'PropertiesController@getPropertyByProgressStatus')
then on the PropertiesController;
public function getPropertyByProgressStatus($status){
if($status==1)
// purchased code
elseif($status==2)
// waiting code
}
then the links will be
http://api/v1/properties/status/1 // FOR PURCHASED
http://api/v1/properties/status/2 // FOR WATING
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community