course details changes done
This commit is contained in:
parent
3321783b3a
commit
60c109d27b
@ -0,0 +1,77 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: karthi
|
||||||
|
* Date: 12/12/17
|
||||||
|
* Time: 11:56 AM
|
||||||
|
*/
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
|
||||||
|
/** @noinspection PhpIncludeInspection */
|
||||||
|
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is an example of a few basic user interaction methods you could use
|
||||||
|
* all done with a hardcoded array
|
||||||
|
*
|
||||||
|
* @package CodeIgniter
|
||||||
|
* @subpackage Rest Server
|
||||||
|
* @category Controller
|
||||||
|
* @author
|
||||||
|
* @license MIT
|
||||||
|
* @link
|
||||||
|
*/
|
||||||
|
class Fees_Status_Controller extends REST_Controller {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
// Construct the parent class
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
// Configure limits on our controller methods
|
||||||
|
// Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
|
||||||
|
$this->methods['getStudentList_get']['limit'] = 500; // 500 requests per hour per user/key
|
||||||
|
$this->methods['getStudentList_post']['limit'] = 1000; // 100 requests per hour per user/key
|
||||||
|
$this->methods['getStudentList_delete']['limit'] = 50; // 50 requests per hour per user/key
|
||||||
|
// load the model
|
||||||
|
$this->load->model('Fees_model', 'Fees_status_model');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* get student list for fees update
|
||||||
|
* created by kms
|
||||||
|
* */
|
||||||
|
public function getStudentList_post()
|
||||||
|
{
|
||||||
|
$search['requestedBy'] = $this->post('createdBy');
|
||||||
|
$search['StudentName'] = $this->post('studentName');
|
||||||
|
$search['MobileNumber'] = $this->post('mobileNumber');
|
||||||
|
$getStudentDetails = $this->Fees_model->getStudentList($search);
|
||||||
|
|
||||||
|
if ($getStudentDetails)
|
||||||
|
{
|
||||||
|
$getTrackedDetails['status'] = REST_Controller::HTTP_OK;
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response($getStudentDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Set the response and exit
|
||||||
|
$this->response([
|
||||||
|
'message' => 'No records found!',
|
||||||
|
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||||
|
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user