DonnyS

web

May 28th, 2017
2,024
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.61 KB | None | 0 0
  1. <?php
  2. Route::get('nyoba', function () {
  3.     return 'Hi, welcome to Laravel';
  4. });
  5.  
  6. Route::get('tabung',function () {
  7.     return view('Tabung.index');
  8. });
  9.  
  10. Route::get('/Project1','Project1Controller@index');
  11. Route::post('/Project1/auth','Project1Controller@auth');
  12.  
  13.  
  14. Route::get('/','HomeController@index');
  15. Route::get('about','HomeController@about');
  16.  
  17. //Route::get('karyawan','KaryawanController@karyawan');
  18.  
  19. //Route::get('about','BelajarController@index');
  20. Route::get('karyawan','KaryawanController@index');
  21. Route::get('karyawan/create','KaryawanController@create');
  22. Route::post('karyawan/cari','KaryawanController@cari');
  23. Route::get('karyawan/{karyawan}','KaryawanController@show');
  24. Route::post('karyawan/','KaryawanController@store');
  25. Route::get('karyawan/{karyawan}/edit','KaryawanController@edit');
  26. Route::patch('karyawan/{karyawan}','KaryawanController@update');
  27. Route::delete('karyawan/{karyawan}','KaryawanController@destroy');
  28.  
  29. Route::get('sampeldata',function(){
  30.     DB::table('employees')->insert([
  31.         [
  32.             'nama' => 'Zaid',
  33.             'nip'=> '10001',
  34.             'tgl_lahir' => '1990-01-22',
  35.             'gender' => 'L',
  36.             'created_at'=> '2017-04-24 21:18',
  37.             'updated_at'=>'2017-04-24 21:18'
  38.             ],
  39.             [
  40.             'nama' => 'Hindun',
  41.             'nip'=> '10002',
  42.             'tgl_lahir' => '1998-01-22',
  43.             'gender' => 'P',
  44.             'created_at'=> '2017-04-24 21:19',
  45.             'updated_at'=>'2017-04-24 21:19'],
  46.             ['nama' => 'Hasan',
  47.             'nip'=> '10003',
  48.             'tgl_lahir' => '1991-11-26',
  49.             'gender' => 'L',
  50.             'created_at'=> '2017-04-24 21:18',
  51.             'updated_at'=>'2017-04-24 21:18']
  52.             ]);
  53. });
  54.  
  55. Route::get('caridata','KaryawanController@search');
Advertisement
Add Comment
Please, Sign In to add comment