Skip to main content

Laravel Step by Step


Membuat aplikasi Blog dengan Laravel:


Syarat:

1. Terinstall PHP minimal 7.1.3
2. Webserver (saya gunakan IIS)

Langkah-langkahnya sbb:

1. Install Composer (jika belum tersedia)
2. Jalankan command
3. pada command prompt, masuk ke direktori c:\inetpub\wwwroot\laravel\

c:
cd\inetpub\wwwroot\laravel\

4. masih pada command prompt, ketik:

laravel new blog

5. Buat tabel :

C:\inetpub\wwwroot\laravel\blog>php artisan make:migration create_blog_table
Created Migration: 2018_03_19_053717_create_blog_table

Hasilnya adalah file \database\migrations\2018_03_19_053717_create_blog_table.php

yang berisi perintah untuk membuat tabel.

6. Edit file

a. pada bagian public function up()

    public function up()
    {
Schema::create('blog_post', function
(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->string('description');
$table->timestamps();
});

    }

    public function down()
    {
        Schema::dropIfExists('blog_post');
    }

7. Eksekusi:

C:\inetpub\wwwroot\laravel\blog>php artisan migrate

Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated:  2014_10_12_100000_create_password_resets_table
Migrating: 2018_03_19_053717_create_blog_table
Migrated:  2018_03_19_053717_create_blog_table



Comments

Popular posts from this blog

Indeks Peta RBI

Jika rekan-rekan sekalian membutuhkan index Rupa Bumi Indonesia yang dikeluarkan oleh Badan Informasi Geospasial (sebelumnya bernama BAKOSURTANAL) dalam format shapefile (shp) bisa di download di link di bawah.. File tersebut berisi index RBI dalam skala 1 : 25.000, skala 1 : 50.000 dan skala 1 : 250.000 untuk seluruh Indonesia dengan sistem proyeksi geografis WGS 1984. LINK :  INDEKS PETA RBI

Sistem Penomoran Indeks Peta Rupabumi Indonesia

Menurut PP 10 Tahun 2000 disebutkan bahwa peta adalah suatu gambaran dari unsur-unsur alam dan atau buatan manusia, yang berada di atas maupun di bawah permukaan bumi yang digambarkan pada suatu bidang datar dengan skala tertentu. Salah satu peta yang dihasilkan oleh BADAN INFORMASI GEOSPASIAL adalah Peta Rupabumi Indonesia (RBI). Peta RBI yang dihasilkan oleh BADAN INFORMASI GEOSPASIAL  meliputi skala 1:1.000.000, 1:250.000, 1:100.000, 1:50.000, 1:25.000 dan 1:10.000 dimana seluruh wilayah Indonesia dibagi ke dalam grid-grid ukuran peta yang sistematis. Semua lembar peta tepat antara satu dengan lainnya, demikian pula ukurannya sama untuk setiap lembar. Ukuran lembar peta tergantung dari skala peta yang dibuat. Ukuran lembar Peta Rupabumi Indonesia mengacu pada sistem grid UTM seperti pada Tabel 1. Tabel 1. Ukuran lembar peta berdasarkan skala peta Skala Peta Ukuran Lintang (L) Ukuran Bujur (B) 1 : 1.000.000 4 ° 6 ° 1 : 500.000 2 ° 3 ° 1 : 250.000 1 ° 1 ° 30’ 1 : 10...

Convert Mapinfo Data to Shapefile

MapInfo has two file types: MapInfo data files. These are the files that you directly work with in MapInfo. A dataset consists of multiple files and comprises at least a *.TAB and *.DAT file, but usually a *.TAB, *.DAT, *.MAP and *.ID file. This format is also called the MapInfo TAB format. Alternatively MapInfo data can come in MapInfo Interchange Format. This is data that has been explicitly exported in MapInfo. Data in this format comes as a single *.MIF file (containing the data), or as as set of a *.MIF and a *.MID file (the first containing the data, the second symbology). This format is also called the MapInfo MIF format. On the ArcGIS side we will be happy to use Shapefiles – we can easily convert them to/from Geodatabases if required. 1. Start QGIS 2. Load your source file: Go to Layer > Add Vector Layer. Browse for your input file (TAB or MIF or Shapefile). Select the input file and load it into QGIS: 3. QGIS automatically reads TAB, MIF and Shapefiles, so it s...