From 1db358001b681cd4ddbb2d880962d7c5588aa442 Mon Sep 17 00:00:00 2001 From: afiq Date: Fri, 20 Aug 2021 04:23:48 +0800 Subject: [PATCH] Blacklist --- app/Blacklist.php | 27 +++++++++++++++++++++ app/Http/Controllers/CustomerController.php | 8 ++++++ config/database.php | 8 ------ routes/web.php | 1 + 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 app/Blacklist.php diff --git a/app/Blacklist.php b/app/Blacklist.php new file mode 100644 index 0000000..704db95 --- /dev/null +++ b/app/Blacklist.php @@ -0,0 +1,27 @@ +json(number_format($jumlahBakiLelong,2)); } + + public function blacklistCustomer(Request $request){ + + $blacklist = Blacklist::where('nokp',$request->nokp)->first(); + + return response()->json($blacklist); + } } diff --git a/config/database.php b/config/database.php index eebc494..da7a044 100644 --- a/config/database.php +++ b/config/database.php @@ -16,7 +16,6 @@ return [ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, - 'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'), ], 'mysql2' => [ 'driver' => 'mysql', @@ -29,7 +28,6 @@ return [ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, - 'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'), ], 'mysql3' => [ 'driver' => 'mysql', @@ -42,7 +40,6 @@ return [ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, - 'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'), ], 'mysql4' => [ 'driver' => 'mysql', @@ -55,7 +52,6 @@ return [ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, - 'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'), ], 'mysql5' => [ 'driver' => 'mysql', @@ -68,7 +64,6 @@ return [ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, - 'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'), ], @@ -83,7 +78,6 @@ return [ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, - 'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'), ], @@ -98,7 +92,6 @@ return [ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, - 'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'), ], 'mysql8' => [ 'driver' => 'mysql', @@ -111,7 +104,6 @@ return [ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, - 'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'), ], 'mysql9' => [ diff --git a/routes/web.php b/routes/web.php index 86b43f6..b933e59 100644 --- a/routes/web.php +++ b/routes/web.php @@ -38,6 +38,7 @@ $router->group(['prefix'=>'api'], function () use ($router){ $router->get('customers/latest/{kodcaw}',['uses'=>'CustomerController@getLatestCustomer']); $router->put('customers/information/update/admin', ['uses' => 'CustomerController@customerUpdateAdmin']); $router->get('admin/customers/nokp/search',['uses'=>'CustomerController@showOneCustomerByICAdmin']); + $router->get('customer/blacklist',['uses'=>'CustomerController@blacklistCustomer']); //Gadai API $router->get('gadai',['uses'=>'GadaiController@showAllGadais']);