diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index 5f74cb3c4ab1e2b6ab00f84b113fb2325a02de26..f5cdda0102f6a0a2ffc19e1b81e53904c785b48f 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -5,6 +5,7 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Member; +use App\Models\Receipt; use Illuminate\Support\Facades\DB; @@ -24,7 +25,9 @@ public function Admin_home(){ */ public function Approve_tranfer(){ - return view('Admin/Transection/v_approve_tranfer'); + $raw = new Receipt(); + $data['user_receipt'] = $raw->get_recipt(); + return view('Admin/Transection/v_approve_tranfer', $data); } /* diff --git a/app/Models/Receipt.php b/app/Models/Receipt.php index 9f4c604269ac601c8b05ea746e5907af7a5ac2e3..a497f65e9cce43958feb0bf8597d27f0941037a9 100644 --- a/app/Models/Receipt.php +++ b/app/Models/Receipt.php @@ -3,6 +3,7 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Facades\DB; /** * @property integer $id @@ -16,7 +17,7 @@ class Receipt extends Model { /** * The table associated with the model. - * + * * @var string */ protected $table = 'Receipt'; @@ -25,4 +26,10 @@ class Receipt extends Model * @var array */ protected $fillable = ['rec_name', 'rec_amount', 'rec_date_and_time', 'rec_img', 'mem_id']; + + public function get_recipt() + { + $data = DB::table('Receipt')->select()->get(); + return $data; + } } diff --git a/resources/views/Admin/Transection/v_approve_tranfer.blade.php b/resources/views/Admin/Transection/v_approve_tranfer.blade.php index 0df513935db3ae0df5898566948308536f55537f..afc7f8071a6c2bc4d3938456d5122a1ec6e35026 100644 --- a/resources/views/Admin/Transection/v_approve_tranfer.blade.php +++ b/resources/views/Admin/Transection/v_approve_tranfer.blade.php @@ -32,7 +32,7 @@ left: 405px; width: 1040px; height: auto; - margin: 0 auto; + margin: 0 auto; background: #ffffff; } @@ -80,9 +80,9 @@ <h1 class="m-5">หลักฐานการแจ้งฝากเงิน</h1> <div class="container"> - + <div class="container"> - + <div class="row"> <div class="col mt-5"> <div class="row m-3 d-flex justify-content-end"> @@ -102,31 +102,14 @@ </tr> </thead> <tbody> + @foreach ($user_receipt as $user) <tr> - <td>01/01/2566</td> - <td>19:00 น.</td> - <td>นาย สมศักดิ์ ใจดี</td> - <td></td> - <td>500 บาท</td> - <td>สำเร็จ</td> - - </tr> - <tr> - <td>01/01/2566</td> - <td>19:00 น.</td> - <td>นาย สมศักดิ์ ใจดี</td> - <td></td> - <td>500 บาท</td> - <td>สำเร็จ</td> - </tr> - <tr> - <td>01/01/2566</td> - <td>19:00 น.</td> - <td>นาย สมศักดิ์ ใจดี</td> - <td></td> - <td>500 บาท</td> - <td>สำเร็จ</td> + <td>{{$user->rec_name}}</td> + <td>{{$user->rec_img}}</td> + <td>{{$user->rec_amount}}</td> + <td>{{$user->rec_status}}</td> </tr> + @endforeach </tbody> </table> <div class="d-grid gap-2 d-md-flex justify-content-md-end m-3"> @@ -141,10 +124,10 @@ </div> </div> </div> - - - - + + + + </body> </html> diff --git a/resources/views/Login/v_Login.blade.php b/resources/views/Login/v_Login.blade.php index 118a3f4c72f7815ad7f226c46daead2373d8ecf3..da6994c48eeae7d6a208136a3d422f4cde5dab7e 100644 --- a/resources/views/Login/v_Login.blade.php +++ b/resources/views/Login/v_Login.blade.php @@ -2,7 +2,7 @@ <html> <head> - <title>CSA</title> + <title>ฌาปนกิจสงเคราะห์ สภาทนายความ</title> <link rel="stylesheet" href="css\login.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> @@ -12,7 +12,6 @@ </script> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> - <title>CSA</title> <link rel="stylesheet" href="css/Login/login.css"> </head>