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

Contact Us at blog.kerul.net

Powered by EMF HTML Contact Form

Login JSON Android using Login Activity

I’ve been trying to release this tutorial quite a while. At last after a long hard effort. Since HttpClient is not supported any more in Android SDK 23, I have to resort to org.json.JSONObject and java.net.HttpURLConnection library to do online database with JSON. The objective of this tutorial is to log-in from a mobile client with the username and password stored in an online database facility. STEP 1: Create a new Android project, this time choose the LoginActivity .

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

Pick a file using Intent.ACTION_GET_CONTENT

This tutorial is tested on Honeycomb 3.0 environment. In order to be used it in the lower level of Android API, I believe you could just change the target in the Android project. Screenshots Pick an image file using Intent.ACTION_GET_CONTENT The intention of this project is to choose an image file available in the device storage, and simply display it in an ImageView. The benefit of using Intent.ACTION_GET_CONTENT is you don’t have to develop open dialog box which is not available in the Android library. ACTION_GET_CONTENT with MIME type */* and category CATEGORY_OPENABLE -- Display all pickers for data that can be opened with ContentResolver.openInputStream() , allowing the user to pick one of them and then some data inside of it and returning the resulting URI to the caller. This can be used, for example, image chooser (as shown in this article).