Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Route untuk paparkan senarai users
- Route::get('users', function () {
- $page_title = 'Senarai Users';
- $senarai_users = [
- ['id' => 1, 'nama' => 'Ali Bin Baba', 'email' => 'alibaba@gmail.com', 'phone' => '0123456789'],
- ['id' => 2, 'nama' => 'Abdul Wahab', 'email' => 'abdul@gmail.com', 'phone' => '0123656789'],
- ['id' => 3, 'nama' => 'Sidiq Sigaraga', 'email' => 'sidiq@gmail.com', 'phone' => '016576789'],
- ['id' => 4, 'nama' => 'Chong Wei', 'email' => 'chongwei@gmail.com', 'phone' => '019866789'],
- ['id' => 5, 'nama' => 'Siti', 'email' => 'siti@gmail.com', 'phone' => '0123456559']
- ];
- # return view('users/template_index', ['page_title' => $page_title]);
- # return view('users/template_index')->with('page_title', $page_title);
- return view('users/template_index', compact('page_title', 'senarai_users'));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement