Skip to content

Commit

Permalink
Clear comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nguyen Ngoc Nam committed Aug 9, 2019
1 parent a847a1f commit e589038
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 32 deletions.
17 changes: 0 additions & 17 deletions app/Http/Controllers/Api/EmployeeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class EmployeeController extends BaseController {
protected $modelClassName;
// protected $title = '';

public function __construct(Request $request)
{
Expand All @@ -18,7 +17,6 @@ public function __construct(Request $request)
public function init()
{
$this->modelClassName = "\App\Model\Employee";
// $this->title = __("screen.employee");
}

/**
Expand All @@ -43,14 +41,6 @@ public function show(Employee $employee)
return response()->json($employee);
}

// public function create()
// {
// $model = new Employee();
// $model->fill($this->request->all());

// return response()->json($list);
// }

/**
* Example URL: http://wealthpark.miko.nam/api/employee/create
* Method: POST
Expand All @@ -69,13 +59,6 @@ public function store(Request $request)
return response()->json($result);
}

// public function edit(Employee $employee)
// {
// $list = $this->modelClassName::search($this->request)->orderBy("created_at", "DESC")->paginate(20);

// return response()->json($list);
// }

/**
* Example URL: http://wealthpark.miko.nam/api/employee/{employee_id}
* Method: PUT
Expand Down
1 change: 0 additions & 1 deletion app/Model/Employee.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class Employee extends BaseModel
use EmployeeTrait;

protected $fillable = [
// 'id',
'firstname',
'lastname',
'birthday',
Expand Down
9 changes: 1 addition & 8 deletions public/js/employee/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ app.controller('myCtrl', function($scope, $http) {

params = objectAttributeFilter(params);

// console.log("params");
// console.log(params);
var config = {
params: params,
method : 'GET',
Expand All @@ -44,7 +42,6 @@ app.controller('myCtrl', function($scope, $http) {
.then(
function($response) { // 成功
$scope.model_list = $response.data.data;
// console.log($response.data);
$scope.last_page = $response.data.last_page;
$scope.current_page = $response.data.current_page;

Expand All @@ -58,13 +55,12 @@ app.controller('myCtrl', function($scope, $http) {
$scope.range = pages;

}, function ($response) { // エラー発生
// $scope.myWelcome = $response.statusText;
console.log("get: error");
console.log($response);
}
);

// pagination(app, $argument);
pagination(app);
}

$scope.loadData = function(page){
Expand Down Expand Up @@ -149,9 +145,6 @@ app.controller('myCtrl', function($scope, $http) {

params = objectAttributeFilter(params);

// console.log("params");
// console.log(params);

$http.post(url, JSON.stringify(params))
.then(
function($response) { // 成功
Expand Down
6 changes: 0 additions & 6 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@


Route::resource('employee', 'Api\EmployeeController');
// Route::post('employee/create', 'Api\EmployeeController@store');

// Route::group(['prefix' => 'employee'], function(){
// Route::delete('{id}', 'Api\EmployeeController@destroy');
// });


// Route::middleware('auth:api')->get('/user', function (Request $request) {
// return $request->user();
Expand Down

0 comments on commit e589038

Please sign in to comment.