SlideShare a Scribd company logo
1 of 44
Download to read offline
Universitas Safin Pati x Politeknik Negeri Semarang
Introduction to Laravel :
Build Your First Web App
#WebDevelopmentStudyJam
instagram
github
Linkedin
g.dev/username
Fahima Choirun Nabila (Hima)
Politeknik Negeri Semarang
Curriculum and Developer - Web Development
5th Semester CNMS Student in Universite Grenoble-Alpes
Fulltime D4 TI Student in Politeknik Negeri Semarang
fahima_nabila
github.com/fahimanabila
linkedin.com/in/fahimanabila
g.dev/fahimanabila
Agenda Today!
PHP Framework & MVC
15mn
About Laravel
30mn
Practice :
Mekanisme (Eloquent ORM)
Laravel Blade Templating Engine
60mn
QnA (Sharing Time)
45mn
Ground Rules
✔ Be Active participant
✔ Raise your hand anytime if you have question
✔ Respect the audience
✔ Focus on materials and Let’s study!
Disclaimer : I’m not an expert, so feel free to discuss with me!
We are now in :
PHP Framework & MVC
15mn
Sejarah PHP Framework
PHP Prosedural
Library (Kumpulan script)
OOP (Object Oriented Programming)
Framework
Web Development
Apa itu Framework
● Kumpulan script berupa class dan function
● Kumpulan Libraries
● Komponen pemrograman yang ready to
re-use
● Web framework dikenal juga dengan
web-app framework
● OOP Based
Web Development
Kelebihan Framework
● Menghemat waktu pengerjaan aplikasi
● Modul-modul terjaga keintegritasannya
● Mudah dikembangkan dan dibaca
(well-documented)
● Template tersedia (login page, register,
session)
● Development lebih ke issue-oriented sudah
bukan structural/format-oriented
● Lebih secure
● Fleksibel
Web Development
CSM vs Framework
Web Development
MVC : Arsitektur Web
Framework
Model
Mewakili struktur data. Mengandung
fungsi-fungsi untuk berkomunikasi
dengan database. Berhubungan dengan
pengelolaan database.
View
kode yang mengeluarkan HTML/Markup
yang akan dilihat oleh pengunjung.
Controller
bagian yang menjembatani antara model
dengan view. Berisi perintah-perintah
yang berfungsi untuk memproses suatu
data dan mengirimkannya ke halaman
web.
Summary for MVC
We are now in :
About Laravel
30mn
Apa itu Laravel?
● Framework PHP open-source
● MVC (Model View Controller)
● Taylor Otwell
● Sintaks ekspresif dan elegan
● Framework paling populer
Kenapa Laravel?
$koneksi = mysql_connect(“localhost”,
“username”, “password”, “database”);
$query = “SELECT * FROM Pelanggan”;
$data = mysqli_query($koneksi, $query);
$row_data = mysqli_fetch_array($data);
print_r($row_data);
DB : : table(‘Pelanggan’)->all();
● Expressive, elegan dan beautiful
syntax
● Illuminate,
● Migrasi Database
● Cocok untuk tim
● Kualitas
● Artisan = menjalankan
perintah-perintah PHP
● Autentifikasi = fungsi autentifikasi
akan muncul otomatis
php artisan make:auth
● Controller =
php artisan make:controller
nama_controller
● Keamanan
● Minimalisir perulangan
● Lebih cepat, hemat waktu dan biaya
● Mendukung kemudahan dalam
bekerja
● Dokumentasi lengkap
id-laravel.com
Learninglaravel.net
Laracasts.com
Laravel-news.com
● Dukungan komunitas
Struktur Folder
Laravel
App/Http
Console, exceptions, HTTP, providers
Bootstrap
Direktori yag berisi file yang digunakan untuk
caching. Optimasi route dan config yang ada pada
Laravel.
Config
Berisi semua file konfigurasi yang dijalankan oleh
Laravel.
Database
Factories, seeds, migrations
Public
Direktori yang seluruh resource aplikasinya dapat
diakses secara penuh oleh user/client melalui web
browser, seperti javascript atau css atau image
Resource
Assets, lang, views
Routes
Berfungsi sebagai jalan yang akan dlilalui oleh client
dalam menggunakan Laravel kita
Storage
Direktori ini berisi template blade yang akan
dikompilasi oleh Laravel, file session, file cache dan
file lain yang dihasilkan oleh Laravel
Tests
Direktori ini menyimpan seluruh file test yang
digunakan untuk menguji laravel.
Vendor
Direktori ini digunakan untuk menyimpan seluruh
dependency manager yang digunakann ->
composer
Perintah Artisan Laravel
● php artisan migrate = melakukan migrasi database
dengan perintah PHP
● php artisan serve = membuat local development
server Laravel dengan PHP
● php artisan tinker = perintah untuk berinteraksi ke
dalam Laravel melalui terminal atau command
prompt.
● php artisan db:seed = perintah ini digunakan untuk
mengeksekusi file seeder untuk disimpan ke dalam
database
● php artisan make:auth = perintah ini untuk generate
register dan login di dalam Laravel
● php artisan make:controller = perintah ini digunakan
untuk membuat file controller
● php artisan make: model = perintah ini digunakan
untuk membuat model
Laravel Routing
● Digunakan sebagai alur atau jalur yang akan dilalui.
● Setiap route dibuat/didefiniskan pada file web.php
● Mendaftar semua URI yang bisa diakses oleh
pengguna aplikasi berdasarkan respon HTTP .
● Applicable untuk semua routing
Laravel Blade
● Model desain halaman web yang digunakan Laravel
disebut templating blade
● Templating ini membantu pada saat proses
development
Laravel Eloquent ORM
Laravel Eloquent ORM
Laravel Eloquent ORM
Laravel Eloquent Collection
● first()
● last()
● count()
● take()
● pluck()
● where()
● whereIn()
● toArray()
● toJSON()
We are now in :
Practice :
Mekanisme (Eloquent ORM)
Laravel Blade Templating Engine
60mn
Practice with You
Web Development
Things to be prepared
● PC
● Peramban web : Internet Explorer,
Firefox, Google Chrome, Opera atau
Safari
● Aplikasi server local : XAMPP
https://www.apachefriends.org/download.html
● Aplikasi text editor : Visual Studio Code
https://code.visualstudio.com/download
● Instalasi Composer
https://getcomposer.org/download
Web Development Native
Composer Installation
Composer Installation
Composer Installation
Laravel Installation
Laravel Access
Laravel Access
Blade Templating : Convert HTML view to Framework
We are now in :
QnA (Sharing Time)
45mn
QnA
quelle est ta question?
MERCI A TOUS
Politeknik Negeri Semarang

More Related Content

Similar to Build Your First Web App.pdf

Tugas 4 rekayasa web
Tugas 4 rekayasa webTugas 4 rekayasa web
Tugas 4 rekayasa webmuslim rohadi
 
PROGRESS DEV - Basic Laravel 5.3 #1
PROGRESS DEV - Basic Laravel 5.3 #1PROGRESS DEV - Basic Laravel 5.3 #1
PROGRESS DEV - Basic Laravel 5.3 #1UKM PROGRESS
 
Wawan tutorial-zend-bagian-1-3
Wawan tutorial-zend-bagian-1-3Wawan tutorial-zend-bagian-1-3
Wawan tutorial-zend-bagian-1-3Haswi Haswi
 
Optimize php application in high traffic environment
Optimize php application in high traffic environmentOptimize php application in high traffic environment
Optimize php application in high traffic environmentk4ndar
 
web_server-side-scripting2.pdf
web_server-side-scripting2.pdfweb_server-side-scripting2.pdf
web_server-side-scripting2.pdfAhmadKhanifFikri
 
Tugas 1 rekayasa web
Tugas 1 rekayasa webTugas 1 rekayasa web
Tugas 1 rekayasa webNasrul Akbar
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to LaravelYogi Pratama
 
0301_Pertemuan 1.pdf
0301_Pertemuan 1.pdf0301_Pertemuan 1.pdf
0301_Pertemuan 1.pdfyenisianturi4
 
Tugas 4 rekayasa web
Tugas 4 rekayasa webTugas 4 rekayasa web
Tugas 4 rekayasa webrizkyripai
 
Tugas4 0916-[jeffry evanto putra]-[1511510727].pptx
Tugas4 0916-[jeffry evanto putra]-[1511510727].pptxTugas4 0916-[jeffry evanto putra]-[1511510727].pptx
Tugas4 0916-[jeffry evanto putra]-[1511510727].pptxjeffry putra
 
Berkenalan dengan bahasa php pemrograman web
Berkenalan dengan bahasa php   pemrograman webBerkenalan dengan bahasa php   pemrograman web
Berkenalan dengan bahasa php pemrograman webVicky Nitinegoro
 

Similar to Build Your First Web App.pdf (20)

Modul Laravel
Modul Laravel Modul Laravel
Modul Laravel
 
Basic Laravel.pdf
Basic Laravel.pdfBasic Laravel.pdf
Basic Laravel.pdf
 
WEB II PHP 01
WEB II PHP 01WEB II PHP 01
WEB II PHP 01
 
Tugas 4 rekayasa web
Tugas 4 rekayasa webTugas 4 rekayasa web
Tugas 4 rekayasa web
 
PROGRESS DEV - Basic Laravel 5.3 #1
PROGRESS DEV - Basic Laravel 5.3 #1PROGRESS DEV - Basic Laravel 5.3 #1
PROGRESS DEV - Basic Laravel 5.3 #1
 
Wawan tutorial-zend-bagian-1-3
Wawan tutorial-zend-bagian-1-3Wawan tutorial-zend-bagian-1-3
Wawan tutorial-zend-bagian-1-3
 
Optimize php application in high traffic environment
Optimize php application in high traffic environmentOptimize php application in high traffic environment
Optimize php application in high traffic environment
 
Framework laravel
Framework laravelFramework laravel
Framework laravel
 
web_server-side-scripting2.pdf
web_server-side-scripting2.pdfweb_server-side-scripting2.pdf
web_server-side-scripting2.pdf
 
Tugas 1 rekayasa web
Tugas 1 rekayasa webTugas 1 rekayasa web
Tugas 1 rekayasa web
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to Laravel
 
Seminggubelajarlaravel sample
Seminggubelajarlaravel sampleSeminggubelajarlaravel sample
Seminggubelajarlaravel sample
 
0301_Pertemuan 1.pdf
0301_Pertemuan 1.pdf0301_Pertemuan 1.pdf
0301_Pertemuan 1.pdf
 
Tugas 4 rekayasa web
Tugas 4 rekayasa webTugas 4 rekayasa web
Tugas 4 rekayasa web
 
WEBINAR PPT.pptx
WEBINAR PPT.pptxWEBINAR PPT.pptx
WEBINAR PPT.pptx
 
Tugas 4 - Rekayasa Web
Tugas 4 - Rekayasa WebTugas 4 - Rekayasa Web
Tugas 4 - Rekayasa Web
 
Tugas4 0916-[jeffry evanto putra]-[1511510727].pptx
Tugas4 0916-[jeffry evanto putra]-[1511510727].pptxTugas4 0916-[jeffry evanto putra]-[1511510727].pptx
Tugas4 0916-[jeffry evanto putra]-[1511510727].pptx
 
Berkenalan dengan bahasa php pemrograman web
Berkenalan dengan bahasa php   pemrograman webBerkenalan dengan bahasa php   pemrograman web
Berkenalan dengan bahasa php pemrograman web
 
Tugas 1
Tugas 1Tugas 1
Tugas 1
 
Tugas 1
Tugas 1Tugas 1
Tugas 1
 

Build Your First Web App.pdf

  • 1. Universitas Safin Pati x Politeknik Negeri Semarang Introduction to Laravel : Build Your First Web App #WebDevelopmentStudyJam
  • 2. instagram github Linkedin g.dev/username Fahima Choirun Nabila (Hima) Politeknik Negeri Semarang Curriculum and Developer - Web Development 5th Semester CNMS Student in Universite Grenoble-Alpes Fulltime D4 TI Student in Politeknik Negeri Semarang fahima_nabila github.com/fahimanabila linkedin.com/in/fahimanabila g.dev/fahimanabila
  • 3. Agenda Today! PHP Framework & MVC 15mn About Laravel 30mn Practice : Mekanisme (Eloquent ORM) Laravel Blade Templating Engine 60mn QnA (Sharing Time) 45mn
  • 4. Ground Rules ✔ Be Active participant ✔ Raise your hand anytime if you have question ✔ Respect the audience ✔ Focus on materials and Let’s study! Disclaimer : I’m not an expert, so feel free to discuss with me!
  • 5. We are now in : PHP Framework & MVC 15mn
  • 6. Sejarah PHP Framework PHP Prosedural Library (Kumpulan script) OOP (Object Oriented Programming) Framework Web Development
  • 7. Apa itu Framework ● Kumpulan script berupa class dan function ● Kumpulan Libraries ● Komponen pemrograman yang ready to re-use ● Web framework dikenal juga dengan web-app framework ● OOP Based Web Development
  • 8. Kelebihan Framework ● Menghemat waktu pengerjaan aplikasi ● Modul-modul terjaga keintegritasannya ● Mudah dikembangkan dan dibaca (well-documented) ● Template tersedia (login page, register, session) ● Development lebih ke issue-oriented sudah bukan structural/format-oriented ● Lebih secure ● Fleksibel Web Development
  • 9. CSM vs Framework Web Development
  • 10. MVC : Arsitektur Web Framework
  • 11. Model Mewakili struktur data. Mengandung fungsi-fungsi untuk berkomunikasi dengan database. Berhubungan dengan pengelolaan database.
  • 12. View kode yang mengeluarkan HTML/Markup yang akan dilihat oleh pengunjung.
  • 13. Controller bagian yang menjembatani antara model dengan view. Berisi perintah-perintah yang berfungsi untuk memproses suatu data dan mengirimkannya ke halaman web.
  • 15. We are now in : About Laravel 30mn
  • 16. Apa itu Laravel? ● Framework PHP open-source ● MVC (Model View Controller) ● Taylor Otwell ● Sintaks ekspresif dan elegan ● Framework paling populer
  • 17.
  • 18. Kenapa Laravel? $koneksi = mysql_connect(“localhost”, “username”, “password”, “database”); $query = “SELECT * FROM Pelanggan”; $data = mysqli_query($koneksi, $query); $row_data = mysqli_fetch_array($data); print_r($row_data); DB : : table(‘Pelanggan’)->all();
  • 19. ● Expressive, elegan dan beautiful syntax ● Illuminate, ● Migrasi Database ● Cocok untuk tim ● Kualitas ● Artisan = menjalankan perintah-perintah PHP ● Autentifikasi = fungsi autentifikasi akan muncul otomatis php artisan make:auth ● Controller = php artisan make:controller nama_controller ● Keamanan
  • 20. ● Minimalisir perulangan ● Lebih cepat, hemat waktu dan biaya ● Mendukung kemudahan dalam bekerja ● Dokumentasi lengkap id-laravel.com Learninglaravel.net Laracasts.com Laravel-news.com ● Dukungan komunitas
  • 21.
  • 23. App/Http Console, exceptions, HTTP, providers Bootstrap Direktori yag berisi file yang digunakan untuk caching. Optimasi route dan config yang ada pada Laravel. Config Berisi semua file konfigurasi yang dijalankan oleh Laravel. Database Factories, seeds, migrations Public Direktori yang seluruh resource aplikasinya dapat diakses secara penuh oleh user/client melalui web browser, seperti javascript atau css atau image Resource Assets, lang, views
  • 24. Routes Berfungsi sebagai jalan yang akan dlilalui oleh client dalam menggunakan Laravel kita Storage Direktori ini berisi template blade yang akan dikompilasi oleh Laravel, file session, file cache dan file lain yang dihasilkan oleh Laravel Tests Direktori ini menyimpan seluruh file test yang digunakan untuk menguji laravel. Vendor Direktori ini digunakan untuk menyimpan seluruh dependency manager yang digunakann -> composer
  • 25. Perintah Artisan Laravel ● php artisan migrate = melakukan migrasi database dengan perintah PHP ● php artisan serve = membuat local development server Laravel dengan PHP ● php artisan tinker = perintah untuk berinteraksi ke dalam Laravel melalui terminal atau command prompt. ● php artisan db:seed = perintah ini digunakan untuk mengeksekusi file seeder untuk disimpan ke dalam database ● php artisan make:auth = perintah ini untuk generate register dan login di dalam Laravel ● php artisan make:controller = perintah ini digunakan untuk membuat file controller ● php artisan make: model = perintah ini digunakan untuk membuat model
  • 26. Laravel Routing ● Digunakan sebagai alur atau jalur yang akan dilalui. ● Setiap route dibuat/didefiniskan pada file web.php ● Mendaftar semua URI yang bisa diakses oleh pengguna aplikasi berdasarkan respon HTTP . ● Applicable untuk semua routing
  • 27. Laravel Blade ● Model desain halaman web yang digunakan Laravel disebut templating blade ● Templating ini membantu pada saat proses development
  • 31. Laravel Eloquent Collection ● first() ● last() ● count() ● take() ● pluck() ● where() ● whereIn() ● toArray() ● toJSON()
  • 32. We are now in : Practice : Mekanisme (Eloquent ORM) Laravel Blade Templating Engine 60mn
  • 33. Practice with You Web Development
  • 34. Things to be prepared ● PC ● Peramban web : Internet Explorer, Firefox, Google Chrome, Opera atau Safari ● Aplikasi server local : XAMPP https://www.apachefriends.org/download.html ● Aplikasi text editor : Visual Studio Code https://code.visualstudio.com/download ● Instalasi Composer https://getcomposer.org/download Web Development Native
  • 41. Blade Templating : Convert HTML view to Framework
  • 42. We are now in : QnA (Sharing Time) 45mn
  • 43. QnA quelle est ta question?
  • 44. MERCI A TOUS Politeknik Negeri Semarang