Blacklist
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Blacklist extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'senhitam';
|
||||||
|
protected $connection = 'mysql7';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
// protected $fillable = [
|
||||||
|
|
||||||
|
// ];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes excluded from the model's JSON form.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
// protected $hidden = [];
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ use App\Gadai;
|
|||||||
use App\Lelong;
|
use App\Lelong;
|
||||||
use App\Cawangan;
|
use App\Cawangan;
|
||||||
use App\Poskod;
|
use App\Poskod;
|
||||||
|
use App\Blacklist;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
@@ -703,4 +704,11 @@ class CustomerController extends Controller
|
|||||||
}
|
}
|
||||||
return response()->json(number_format($jumlahBakiLelong,2));
|
return response()->json(number_format($jumlahBakiLelong,2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function blacklistCustomer(Request $request){
|
||||||
|
|
||||||
|
$blacklist = Blacklist::where('nokp',$request->nokp)->first();
|
||||||
|
|
||||||
|
return response()->json($blacklist);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ return [
|
|||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
|
||||||
],
|
],
|
||||||
'mysql2' => [
|
'mysql2' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
@@ -29,7 +28,6 @@ return [
|
|||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
|
||||||
],
|
],
|
||||||
'mysql3' => [
|
'mysql3' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
@@ -42,7 +40,6 @@ return [
|
|||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
|
||||||
],
|
],
|
||||||
'mysql4' => [
|
'mysql4' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
@@ -55,7 +52,6 @@ return [
|
|||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
|
||||||
],
|
],
|
||||||
'mysql5' => [
|
'mysql5' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
@@ -68,7 +64,6 @@ return [
|
|||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -83,7 +78,6 @@ return [
|
|||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -98,7 +92,6 @@ return [
|
|||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
|
||||||
],
|
],
|
||||||
'mysql8' => [
|
'mysql8' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
@@ -111,7 +104,6 @@ return [
|
|||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
|
|
||||||
|
|
||||||
],
|
],
|
||||||
'mysql9' => [
|
'mysql9' => [
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ $router->group(['prefix'=>'api'], function () use ($router){
|
|||||||
$router->get('customers/latest/{kodcaw}',['uses'=>'CustomerController@getLatestCustomer']);
|
$router->get('customers/latest/{kodcaw}',['uses'=>'CustomerController@getLatestCustomer']);
|
||||||
$router->put('customers/information/update/admin', ['uses' => 'CustomerController@customerUpdateAdmin']);
|
$router->put('customers/information/update/admin', ['uses' => 'CustomerController@customerUpdateAdmin']);
|
||||||
$router->get('admin/customers/nokp/search',['uses'=>'CustomerController@showOneCustomerByICAdmin']);
|
$router->get('admin/customers/nokp/search',['uses'=>'CustomerController@showOneCustomerByICAdmin']);
|
||||||
|
$router->get('customer/blacklist',['uses'=>'CustomerController@blacklistCustomer']);
|
||||||
|
|
||||||
//Gadai API
|
//Gadai API
|
||||||
$router->get('gadai',['uses'=>'GadaiController@showAllGadais']);
|
$router->get('gadai',['uses'=>'GadaiController@showAllGadais']);
|
||||||
|
|||||||
Reference in New Issue
Block a user