This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Route::get('/kirimemail', function(){ | |
| $nama_tujuan="Dian Sano"; | |
| $email_tujuan="[email protected]"; | |
| $data=array("nama"=>"Joss Gandos", "body"=>"<h1>Belajar Laravel!!</h1>"); | |
| Mail::send('mailview', $data, function($pesan) | |
| use($nama_tujuan, $email_tujuan){ | |
| $pesan->to($email_tujuan) | |
| ->subject('Laravel 6'); | |
| }); | |
| echo "email berhasil dikirim"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Support\Facades\DB; | |
| use App\Pengguna; | |
| use App\Perusahaan; | |
| class ControllerPengguna extends Controller { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Perusahaan extends Model { | |
| public $timestamps = false; //karena tabel di database tidak memmiliki timestamps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Pengguna extends Model { | |
| public $timestamps = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use App\Perusahaan; | |
| class ControllerPerusahaan extends Controller { | |
| function update(Request $req) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>Eloquent Model Tutorial</title> | |
| </head> | |
| <body> | |
| <form action="update" method="POST"> | |
| @csrf | |
| <select name="id"> | |
| <option value="7">Nike</option> | |
| <option value="9">Wuling</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Perusahaan extends Model { | |
| public $timestamps = false; //karena tabel di database tidak memmiliki timestamps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use App\Perusahaan; | |
| class ControllerPerusahaan extends Controller | |
| { | |
| function update(Request $req) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>Eloquent Model Tutorial</title> | |
| </head> | |
| <body> | |
| <form action="submit" method="POST"> | |
| @csrf | |
| <input type="text" name="nama" placeholder="Nama Perusahaan"> | |
| <br><br> | |
| <input type="text" name="alamat" placeholder="Alamat Perusahaan"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title> | |
| Pagination Tutorial | |
| </title> | |
| <style> | |
| .page-item{ | |
| display: inline-block; | |
| padding: 10px; | |
| } |