Skip to main content

Laravel - for a start

Slides at fstm.kuis.edu.my/blog/laravel


TMMT6053 Advance Web Development - download proforma


Advantages of PHP Framework

There have been multiple advantages of PHP framework, while developing a website with a PHP framework. Utilizing the PHP framework can encourage website developers to show their best efforts.
  1. PHP framework inbuilt with robust functions: This framework is built with an excellent set of functions; you can abridge tough tasks and get quick results from PHP coding. PHP framework is freeware with various functions; utilizing these functions you can simplify the code in PHP.
  2. Database is a vital point: Database is the crucial factor for each project. It is the central point, where the entire data of the project are saved and called for, when required. MySQL is utilized for the database requirements for PHP.
  3. Use wire-frame before coding: It is always beneficial to use wire frame before you start coding in PHP. The practice of using wire-frame, boost your web development projects effectively. Make sure the wire-frame club and all its elements are integrated perfectly. 
  4. MVC – The Model-View-Controller architectural pattern helps you tier your code for easier maintenance. By keeping the data-manipulating logic separate from the bits that handle the display, you make it much easier to change either the template or the underlying code without touching the other.
  5. Bundled classes – A framework includes classes and helper functions for common tasks, such as database access, pagination, and form handling. Not to mention smaller things, like truncating text to a specific word/character count.
  6. Rapid development – Frameworks help you create a small to medium-sized application much quicker than if you wrote everything from scratch. If you’re in a hurry, using a framework will help you finish things before you reach that looming deadline.

MVC in Laravel 


LARAGON - compiled tools
(Laragon official download/docs site)

What is Laragon?
Laragon is a portable, isolated, fast & powerful universal development environment for PHP, Node.js, Python, Java, Go, Ruby. It is fast, lightweight, easy-to-use and easy-to-extend.

Why Laragon?
Laragon is great for building and managing modern web applications. It is focused on performance - designed around stability, simplicity, flexibility and freedom.

Laragon improves web development. Developers all over the world are using Laragon to make apps quickly and easily. It is used by thousands of developers with loves. You can check out the Testimonials to see how users think of Laragon and it’s features page for more details.



INSTALLING TOOLS - manual
NodeJS = https://nodejs.org
GIT - https://git-scm.com/
Composer https://getcomposer.org/download/ PHP package manager
Text Editor/ PHP storm

CHECK YOUR TOOLS’ VERSION
In your command prompt (cmd) – run as administrator
composer –v       (open source package manager)  to run LARAVEL
git –v                 (versioning control)
npm –v
php –v               (>PHP v5.6)
Do make sure all tools are installed and ready.

DOWNLOAD LARAVEL module to composer
composer global require "laravel/installer"
Expect a long download project package for the first time.
Laravel Project Folder
laravel new hr         (download the Laravel project template)
cd hr
php artisan serve (to ON the project server)
(Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for use while developing your application)
GO to your browser and test http://127.0.0.1:8000/
LARAVEL DOCUMENTATIONS https://laravel.com/docs
Concept of MVC – model view controller
In web environment ----> Routing –> Controller –> View(Presentation) –> Model(DB)

CONTROLLER
To make Controller – its the logic/process. In cmd
php artisan make:controller PagesController

ROUTING
to Pages –> Home, About, Contact

DATABASE
Have your database ready
In .env  - edit database configuration settings.
database-env
PHP ARTISAN MIGRATE to dump the users login content
Migration HRdb
php artisan make:migration create_employees_table
create-db-error
MAKE MODEL
Best practice to have the same name as the table name. Table name plural, model name singular.
php artisan make:model Employee
php artisan make:model Department
php artisan make:model Job
SEEDER - to populate predefined data
php artisan make:seeder JobTableSeeder
php artisan db:seed –-class=JobTableSeeder


FORMS


Validation – custom REQUEST
C:\hr>php artisan make:request Employee\AddRequest




MANY TO MANY with bridge-table

php artisan make:migration create_employee_project_table








Cuma nak kongsi apa yang kami tahu. Supaya mudah nak kick off projek guna Laravel PHP framework. Belum terrorists lagi. Tapi katanya kalau kita kongsi, yang sikit akan jadi banyak. Pasal ilmu bukan fizikal sifatnya. Lagi banyak dikongsi lagi besar dia tumbuh. InsyaAllah 

Kursus khidmat komuniti FSTM Laravel. Jangka satu hari sahaja. Bersama trainer Khirulnizam Abd Rahman.

Tarikh: 27 Januari 2018 (9am - 5pm) (DIBATALKAN kerana kurang penyertaan)
Tempat : Makmal Komputer 5, Bangunan Teknologi Maklumat KUIS ( maps http://bit.ly/mapfstm )

Prasyarat: tahu HTML (Bootstrap) & PHP.
Perisian (sila install sendiri sebelum datang kursus): LARAGON, dicadangkan kod editor PHPStorm atau Eclipse for PHP.
.
YURAN
**RM??/day/person
Laptop & line Internet sendiri. Tiada makanan disediakan. Sijil tertakluk kepada permintaan.

Course Outline

Day 1
Laravel Project Structure
Login Module Example
+ Routing
+ Controller
+ Interface
+ Database 
+ Migration
+ Model
+ Example: Employee Search & Pagination
----

Kaedah Install Laragon (developing)


Comments

Popular posts from this blog

Several English proverbs and the Malay pair

Or you could download here for the Malay proverbs app – https://play.google.com/store/apps/details?id=net.kerul.peribahasa English proverbs and the Malay pair Corpus Reference: Amir Muslim, 2009. Peribahasa dan ungkapan Inggeris-Melayu. DBP, Kuala Lumpur http://books.google.com.my/books/about/Peribahasa_dan_ungkapan_Inggeris_Melayu.html?id=bgwwQwAACAAJ CTRL+F to search Proverbs in English Definition in English Similar Malay Proverbs Definition in Malay 1 Where there is a country, there are people. A country must have people. Ada air adalah ikan. Ada negeri adalah rakyatnya. 2 Dry bread at home is better than roast meat home's the best hujan emas di negeri orang,hujan batu di negeri sendiri Betapa baik pun tempat orang, baik lagi tempat sendiri. 3 There's no accounting for tastes We can't assume that every people have a same feel Kepala sama hitam hati lain-lain. Dalam kehidupan ini, setiap insan berbeza cara, kesukaan, perangai, tabia

Submit your blog address here

Create your own blog and send the address by submitting the comment of this article. Make sure to provide your full name, matrix and URL address of your blog. Refer to the picture below. Manual on developing a blog using blogger.com and AdSense, download here … Download Windows Live Writer (a superb offline blog post editor)

Applications of Web 2.0

Web 2.0 describes the changing trends in the use of World Wide Web technology and web design that aim to enhance creativity , secure information sharing, collaboration and functionality of the web. Web 2.0 concepts have led to the development and evolution of web-based communities and hosted services , such as social-networking sites , video sharing sites , wikis , blogs . Find a website or web application that conform to the criteria of Web 2.0. Put the name of the application and the URL in the comment below. Please provide your full name and matrix number. Make sure the application you choose is not already chosen by your friend in the previous comment.

Bootstrap Template for PHP database system - MyCompanyHR

HTML without framework is dull. Doing hard-coded CSS and JS are quite difficult with no promising result on cross platform compatibility. So I decided to explore BootStrap as they said it is the most popular web framework. What is BootStrap? - Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first web sites. (  http://www.w3schools.com/bootstrap/   ) Available here -  http://getbootstrap.com/ Why you need Flat-UI? Seems like a beautiful theme to make my site look professional. Anyway you could get variety of BootStrap theme out there, feel free to select here  http://bootstraphero.com/the-big-badass-list-of-twitter-bootstrap-resources/ Flat-UI is from DesignModo -   http://designmodo.com/flat/ Web Programming MyCompanyHR – PHP & MySQL mini project (with Boostrap HTML framework) Template 1: Template for the Lab Exercise. This is a project sample of a staff record management system. It has the PHP structured co

ViewFlipper Example–a simple FlashCard

UPDATE: Improved with Fling gesture (Sept 2012) UPDATE: ViewFlipper with Flip-In and Flip-Out Animation (August 2012) This tutorial is to demonstrate the ViewFlipper layout that is almost similar to CardLayout (in Java). The app will produce a simple Flash card that provide several screens with different picture for each card. Flip-in and Flip-out animation provided. Added in Sept 2012 – an improvement to support Fling gesture – enjoy… The amendment is only on the coding part. Some how the layout design (main.xml) is quite long. Later I’ll produce separated screen by including several XML layout from outside files. Screenshots;