indocoder.com

I just love to code!

logo laravel

Laravel Tips (2) : Membaca Web Service Sederhana

Membaca API dengan Laravel sangat mudah. Kita akan membaca api yang disediakan oleh https://jsonplaceholder.typicode.com. Endpointnya adalah https://jsonplaceholder.typicode.com/posts/{post_id} Langkah 1 : Buat Route Modifikasi routes/web.php dengan menambahkan baris berikut:

Langkah 2 : Buat Controller dan Method get_api()

Langkah 3 : Jalankan URL Ketik di browser : http://localhost:8000/test-api?post_id=3 Hasilnya seperti ini :

logo laravel

Laravel Tips & Tricks – Select2

Select2 merupakan component menggunakan jQuery yang digunakan untuk menggantikan dropdown yang reguler. Dengan Select2, terdapat kolom untuk search item yang memudahkan kita untuk memilih item yang berada di dalam select. Langkah 1 – Siapkan Data Kita akan menggunakan data yang digenerate oleh mockaroo.com dan saya simpan di tabel dengan nama mockdatas kemudian buat model Mockdata.php Read more about Laravel Tips & Tricks – Select2[…]

logo laravel

Laravel 5.6 and 5.7 Basic 1 : Simple CRUD

Laravel is a PHP Open Source framework accomodating Model-View-Controller (MVC) architecture. At the moment (2018) Laravel has reached version 5.6. In this basic tutorial, we will create a simple CRUD. Later we will create a table with only four columns, the id, name, created_at, and updated_at. Before we begin, laravel should have been installed in Read more about Laravel 5.6 and 5.7 Basic 1 : Simple CRUD[…]

logo laravel

Laravel 5.6 Basic 1 : Membuat CRUD Sederhana

Laravel merupakan salah satu framework PHP yang bersifat Open Source dan mengikuti arsitektur Model-View-Controller (MVC). Saat ini (2018) Laravel sudah mencapai versi 5.6. Di tutorial dasar kali ini, kita akan membuat sebuah CRUD sederhana. Kita akan membuat tabel dasar yang hanya berisi empat kolom, yaitu id, name, created_at, dan updated_at. Sebelum memulai tutorial ini, laravel Read more about Laravel 5.6 Basic 1 : Membuat CRUD Sederhana[…]

Python Basic Syntax

1. Print String and Integer in Python

2. Comment in Python

3. Create Variable in Python

4. Updating Variable

5. Concatenation

6. Type Conversion

7. IF and ELSE Condition

8. True and False

9. AND and OR expression

10. INPUT function

11. LISTS in Python Read more about Python Basic Syntax[…]