winda

routes

May 17th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.46 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Web Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register web routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | contains the "web" middleware group. Now create something great!
  11. |
  12. */
  13.  
  14. //Route::get('nyoba', function () {
  15.  //   return 'welcome to laravel';
  16. //});
  17.  
  18. //Route::get('//','Permohonan@index');
  19.  
  20. Route::get('/', function (){
  21.     return view('chap8.home');
  22. });
  23.  
  24. Route::get('about', function (){
  25.     $halaman='about';
  26.     return view('chap5.about', compact('halaman'));
  27. });
  28.  
  29. Route::get('karyawan',function(){
  30.     $halaman='karyawan';
  31.     $karyawan=['Munawar','Budi','Jono','Unggul jaya'];
  32.     return view('chap5.karyawan',compact('halaman','karyawan'));
  33. });
  34.  
  35. //Route::get('about', 'BelajarController@index');
  36.  
  37. Route::get('/Project1','Project1Controller@index');
  38. Route::post('/Project1/auth','Project1Controller@auth');
  39.  
  40. //Route::post('/','LatihanController@index');
  41.  
  42.  
  43. Route::get('sampeldata',function(){
  44.     DB::table('employees')->insert([
  45.         [
  46.             'nama'  =>'Zaid',
  47.             'nip'   =>'10001',
  48.             'tgl_lahir' =>'1990-01-22',
  49.             'gender'    =>'L',
  50.             'created_at'=>'2017-04-24
  51.             21:18',
  52.             'updated_at'=>'2017-04-24 21:18'],
  53.             [
  54.             'nama'  =>'Hindun',
  55.             'nip'   =>'10002',
  56.             'tgl_lahir' =>'1988-01-22',
  57.             'gender'    =>'P',
  58.             'created_at'=>'2017-04-24
  59.             21:19',
  60.             'updated_at'=>'2017-04-24 21:19'],
  61.             [
  62.             'nama'  =>'Winda',
  63.             'nip'   =>'10004',
  64.             'tgl_lahir' =>'1997-06-34',
  65.             'gender'    =>'P',
  66.             'created_at'=>'2017-04-24
  67.             21:19',
  68.             'updated_at'=>'2017-04-24 21:19'],
  69.             [
  70.             'nama'  =>'Hasan',
  71.             'nip'   =>'10003',
  72.             'tgl_lahir' =>'1991-11-26',
  73.             'gender'    =>'L',
  74.             'created_at'=>'2017-04-24
  75.             21:18',
  76.             'updated_at'=>'2017-04-24 21:18'],
  77.             ]);
  78. });
  79.  
  80. Route::get('/karyawan','KaryawanController@index');
  81. Route::get('/home','KaryawanController@home');
  82. Route::get('/tentang','KaryawanController@tentang');
  83.  
  84. Route::post('/karyawan/cari', 'KaryawanController@cari');
  85. Route::get('/karyawan/detail/{id}', 'KaryawanController@detail');
  86. Route::get('/karyawan/tambah', 'KaryawanController@tambah');
  87. Route::post('/karyawan/simpan', 'KaryawanController@simpan');
  88. Route::get('/karyawan/edit/{id}', 'KaryawanController@edit');
  89.  
  90. Route::post('/karyawan/update', 'KaryawanController@update');
  91. Route::get('/karyawan/hapus/{id}', 'KaryawanController@hapus');
Advertisement
Add Comment
Please, Sign In to add comment