register customer

This commit is contained in:
Afiq
2021-01-04 08:48:55 +08:00
parent dd3ed92b90
commit ed3e8643e1
5 changed files with 93 additions and 0 deletions
@@ -0,0 +1,15 @@
<?php
namespace App\Http\Controllers;
use App\Pekerjaan;
use Illuminate\Http\Request;
class PekerjaanController extends Controller
{
public function showAllPekerjaan(){
$kerja = Pekerjaan::on('mysql7')->get();
return response()->json($kerja);
}
}
@@ -0,0 +1,15 @@
<?php
namespace App\Http\Controllers;
use App\TujuanGadai;
use Illuminate\Http\Request;
class TujuanGadaiController extends Controller
{
public function showAllTujuanGadai(){
$tujuan = TujuanGadai::on('mysql7')->get();
return response()->json($tujuan);
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Pekerjaan extends Model
{
protected $table = 'pekerjaan';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'kodkerja','keterangan'
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
// protected $hidden = [];
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class TujuanGadai extends Model
{
protected $table = 'tujuan_gadai';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'keterangan'
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
// protected $hidden = [];
}