Professional Documents
Culture Documents
Engr.Rabbil Hasan
Why laravel ?
1. About 76% website / web application runs on PHP.
2. Laravel is the most powerful and popular framework of PHP.
3. Design pattern MVC
4. Website/web application/ Rest API
5. Backend everywhere
6. MySql, MS SQL, SQLITE .
7. Application security.
8. Session management .
9. Blade template engine
10. Organized application architecture.
11. No deploy difficulties , Can deploy everywhere.
12. Email, authentication, encryption, broadcasting,CSRF everything is here.
Previous Knowledge
• Who has Basic of PHP MySQL
• Who actually wants to learn
• Designed for beginner to higher
Our Study Strategy
• We should learn laravel as laravel
• Laravel latest version 6x
• First we learn all of features provided by laravel
• Then we perform projects.
• Deploy on real server
Projects
• Website: Laravel.Rabbil.com
• Helpline: Inside Description Below
Tools For Laravel
1. Composer
2. Xampp
3. Visual Studio Code
Create New Project And Run
1. composer create-project --prefer-dist laravel/laravel blog
2. Php artisan serve
Project Structure
MVC – পদ্ধতি
Software Develop করার একটি উত্তম পদ্ধতি
Data Insert
Data Select
Route Controller
Laravel Routing Parameter
Route::group( [ ] , callback);
বাবা Controller
• index()
• create()
• store(Request $request)
• show($id)
• edit($id)
• update(Request $request, $id)
• destroy($id)
Custom Controller
We experienced with
custom controller before
Laravel Views
• Nothing but , html codes that create application interface.
• Two types of views works with laravel.
• Template Inheritance
• Components & Slots
• Displaying Data
• Blade & JavaScript Frameworks
• Control Structures
• Forms
• Including Sub-Views
• Service Injection
• Extending Blade
Creating Simple Blade View
1. Blade View
2. Controller
3. Route
Pass & Display Data inside blade view
Master Layout
Contains Common Resource
• @yield( )
• @section( )
• @extends()
Simple Static Website With Layout
1. Bootstrap
2. Home Page
3. About Page
4. Service Page
5. Portfolio
Laravel Migration
Migration প্রস্তুতিঃ
• Create a MySQL Database.
• Connect with laravel.
Create New Migration
Works Only at Front Migration Works Only For Migration Roll Back
Can Create Table, Column, Index etc… Can Create Table, Column, Index etc…
Can Modify Table, Column, Index etc… Can Modify Table, Column, Index etc…
Can Delete Table, Column, Index etc… Can Delete Table, Column, Index etc…
My First Migration
Migration Overview
1. Table Creation
2. Table Modification
3. Column Creation
4. Column Modification
5. Migration Roll Back
6. Roll Back With Down Method
Laravel Raw SQL Queries
1. Retrieving Results
2. Aggregates
3. Selects
4. Raw Expressions
5. Joins
6. Unions
7. Inserts
8. Ordering, Grouping, Limit & Offset
9. Conditional Clauses
10. Inserts
11. Updates
12. Deletes
Eloquent ORM
Model Use :
ModelClass:: ….expression….
Database: Seeding
Seeding is a process to insert some dummy data in table