๐—ฌ๐—ผ๐˜‚ ๐—ฐ๐—ฎ๐—ป ๐˜€๐˜๐—ถ๐—น๐—น ๐˜€๐˜๐˜‚๐—ฑ๐˜† ๐—ณ๐—ฟ๐—ผ๐—บ ๐—Ÿ๐—ฎ๐—ฟ๐—ฎ๐˜ƒ๐—ฒ๐—น ๐—ผ๐—น๐—ฑ ๐˜ƒ๐—ฒ๐—ฟ๐˜€๐—ถ๐—ผ๐—ป ๐˜ƒ๐—ถ๐—ฑ๐—ฒ๐—ผ ๐—น๐—ฒ๐˜€๐˜€๐—ผ๐—ป๐˜€ ๐—ถ๐—ณ ๐˜†๐—ผ๐˜‚ ๐—ธ๐—ป๐—ผ๐˜„ ๐˜๐—ต๐—ฒ๐˜€๐—ฒ!!

Ye Myint Soe
2 min readNov 1, 2023

--

In Person Class แ€™แ€Ÿแ€ฏแ€แ€บแ€˜แ€ฒ YouTube แ€”แ€ฒแ€ท แ€แ€…แ€บแ€แ€ผแ€ฌแ€ธแ€แ€ฝแ€ฑแ€€ Video Lecture แ€แ€ฝแ€ฑแ€”แ€ฒแ€ท แ€œแ€ฑแ€ทแ€œแ€ฌแ€”แ€ฑแ€แ€ฒแ€ท Beginner แ€แ€ฝแ€ฑ แ€แ€…แ€บแ€แ€ปแ€ญแ€ฏแ€ทแ€€แ€†แ€ญแ€ฏแ€›แ€„แ€บ แ€žแ€ฐแ€แ€ญแ€ฏแ€ท Current Version แ€›แ€ฒแ€ท Course แ€แ€…แ€บแ€แ€ฏแ€€แ€ญแ€ฏ แ€œแ€ฑแ€ทแ€œแ€ฌแ€”แ€ฑแ€แ€ฏแ€”แ€บแ€ธแ€™แ€พแ€ฌแ€•แ€ฒ Laravel Version แ€•แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธแ€žแ€ฝแ€ฌแ€ธแ€แ€ฑแ€ฌแ€ท แ€แ€…แ€บแ€แ€ปแ€ญแ€ฏแ€ทแ€”แ€ฑแ€›แ€ฌ แ€™แ€พแ€ฌ Update Version แ€€แ€ผแ€ฑแ€ฌแ€„แ€ทแ€บ Error แ€œแ€ฑแ€ธแ€แ€ฝแ€ฑแ€–แ€ผแ€…แ€บแ€žแ€ฝแ€ฌแ€ธแ€›แ€„แ€บ แ€†แ€€แ€บแ€™แ€œแ€ฏแ€•แ€บแ€˜แ€ฒ แ€›แ€•แ€บแ€”แ€ฑแ€แ€ฒแ€ท แ€žแ€ฐแ€แ€ฝแ€ฑแ€›แ€พแ€ญแ€•แ€ซแ€แ€šแ€บแ‹

Laravel แ€žแ€Šแ€บ แ†แ€œ (แ€žแ€ญแ€ฏแ€ท) แแ€”แ€พแ€…แ€บ แ€แ€…แ€บแ€แ€ซแ€œแ€ฑแ€ฌแ€€แ€บ Version Upgrade แ€œแ€ฏแ€•แ€บแ€แ€แ€บแ€•แ€ซแ€แ€šแ€บแ‹ แ€’แ€ซแ€•แ€ฑแ€™แ€šแ€ทแ€บ Version แ€•แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธแ€แ€šแ€บแ€†แ€ญแ€ฏแ€•แ€ผแ€ฎแ€ธ แ€กแ€€แ€ผแ€ฎแ€ธแ€กแ€€แ€ปแ€šแ€บ แ€…แ€ญแ€แ€บแ€Šแ€…แ€บ แ€”แ€ฑแ€…แ€›แ€ฌแ€™แ€œแ€ญแ€ฏแ€•แ€ซแ€˜แ€ฐแ€ธแŠ แ€œแ€ฏแ€ถแ€ธแ€œแ€ฏแ€ถแ€ธแ€€แ€ผแ€ฎแ€ธ แ€•แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธแ€žแ€ฝแ€ฌแ€ธแ€แ€ฌแ€™แ€Ÿแ€ฏแ€แ€บแ€˜แ€ฒ แ€™แ€†แ€ญแ€ฏแ€…แ€œแ€ฑแ€ฌแ€€แ€บแ€•แ€ฒ แ€•แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธแ€”แ€ฑแ€œแ€ญแ€ฏแ€ทแ€•แ€ซแ‹

Laravel Version 5^, 6, 7 แ€‘แ€ญแ€€ แ€แ€ฐแ€แ€šแ€บแ€œแ€ญแ€ฏแ€ท แ€†แ€ญแ€ฏแ€”แ€ญแ€ฏแ€„แ€บแ€•แ€ซแ€แ€šแ€บแ‹ Laravel 8, 9, 10 แ€œแ€Šแ€บแ€ธ แ€œแ€ฏแ€ถแ€ธแ€ แ€œแ€ญแ€ฏแ€œแ€ญแ€ฏ แ€แ€ฐแ€€แ€ผ แ€•แ€ซแ€แ€šแ€บแ‹ 7 แ€€แ€”แ€ฑ 8 แ€€แ€ฐแ€ธแ€แ€ฒแ€ท แ€กแ€แ€ปแ€ญแ€”แ€บแ€™แ€พแ€ฌแ€•แ€ฒ แ€”แ€Šแ€บแ€ธแ€”แ€Šแ€บแ€ธ แ€•แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธแ€œแ€ฒแ€™แ€ฐแ€›แ€พแ€ญแ€•แ€ซแ€แ€šแ€‰แ€บแ‹ แ€’แ€ซแ€•แ€ฑแ€™แ€šแ€ทแ€บ แ€…แ€ญแ€แ€บแ€™แ€•แ€ฐแ€•แ€ซแ€”แ€ฒแ€ท แ€’แ€ซแ€œแ€Šแ€บแ€ธ แ€™แ€†แ€ญแ€ฏแ€…แ€œแ€ฑแ€ฌแ€€แ€บแ€•แ€ซแ€•แ€ฒ Laravel 5^, 6, 7 แ€”แ€ฒแ€ท แ€žแ€„แ€บแ€•แ€ฑแ€ธแ€‘แ€ฌแ€ธแ€แ€ฒแ€ท Video Lecture แ€แ€ฝแ€ฑแ€€แ€ญแ€ฏ แ€กแ€แ€ฏแ€‘แ€ญ แ€€แ€ผแ€Šแ€ทแ€บแ€œแ€ญแ€ฏแ€ทแ€›แ€•แ€ซแ€žแ€ฑแ€ธแ€แ€šแ€บแ‹ แ€•แ€ผแ€ฑแ€ฌแ€•แ€ผแ€•แ€ฑแ€ธแ€•แ€ซแ€™แ€šแ€บ Changes แ€œแ€ฑแ€ธแ€แ€ฝแ€ฑแ€€แ€ญแ€ฏแ‹

แ€’แ€ฎ Personal Blog Web App Project แ€€แ€ญแ€ฏแ€แ€ฑแ€ฌแ€ท Laravel Version 7 แ€€แ€ญแ€ฏแ€žแ€ฏแ€ถแ€ธแ€•แ€ผแ€ฎแ€ธ แ€›แ€ฑแ€ธแ€žแ€ฌแ€ธแ€žแ€„แ€บแ€•แ€ผแ€•แ€ฑแ€ธ แ€‘แ€ฌแ€ธแ€•แ€ซแ€žแ€Šแ€บแ‹ แ€กแ€แ€ฏแ€†แ€ญแ€ฏแ€›แ€„แ€บ Laravel แ€›แ€ฒแ€ท Version แ€€ 10 แ€–แ€ผแ€…แ€บแ€žแ€ฝแ€ฌแ€ธแ€•แ€ซแ€•แ€ผแ€ฎแ‹ Laravel 7 แ€”แ€ฒแ€ท Laravel 10 แ€€ Version แ€€แ€ฝแ€ฌแ€”แ€ฑแ€•แ€ฑแ€™แ€šแ€ทแ€บ แ€›แ€ฑแ€ธแ€•แ€ฏแ€ถแ€€ แ€กแ€™แ€ปแ€ฌแ€ธแ€€แ€ผแ€ฎแ€ธแ€™แ€€แ€ฝแ€ฌแ€•แ€ซแ€˜แ€ฐแ€ธแ‹ แ€˜แ€ฌแ€œแ€ฑแ€ธแ€แ€ฝแ€ฑ แ€€แ€ฝแ€ฌแ€แ€ผแ€ฌแ€ธแ€žแ€œแ€ฒ แ€€แ€ผแ€Šแ€ทแ€บแ€€แ€ผแ€Šแ€ทแ€บแ€€แ€ผแ€›แ€กแ€ฑแ€ฌแ€„แ€บแ‹

1. Folder Directory

Laravel 7 แ€™แ€พแ€ฌ Model แ€แ€ฝแ€ฑแ€žแ€Šแ€บ App\Http\ แ€กแ€ฑแ€ฌแ€€แ€บแ€™แ€พแ€ฌ แ€แ€ญแ€ฏแ€€แ€บแ€›แ€ญแ€ฏแ€€แ€บแ€›แ€พแ€ญแ€”แ€ฑแ€•แ€ซแ€แ€šแ€บแ‹
eg.
- \App\Http\User.php
- \App\Http\Post.php

Laravel 8, 9, 10 แ€™แ€พแ€ฌแ€แ€ฑแ€ฌแ€ท Model แ€แ€ฝแ€ฑแ€žแ€Šแ€บ App\Http\Models แ€†แ€ญแ€ฏแ€แ€ฒแ€ท Folder แ€‘แ€ฒแ€™แ€พแ€ฌแ€›แ€พแ€ญแ€”แ€ฑแ€€แ€ผแ€•แ€ซแ€แ€šแ€บแ‹
eg.
- \App\Http\Models\User.php
- \App\Http\Models\Post.php

แ€’แ€ฎแ€œแ€ญแ€ฏ Folder Directory แ€œแ€ฑแ€ธแ€•แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธแ€žแ€ฝแ€ฌแ€ธแ€œแ€ญแ€ฏแ€ท User Model แ€แ€ญแ€ฏแ€ท Post Model แ€แ€ญแ€ฏแ€ทแ€€แ€ญแ€ฏ Controller แ€แ€ฝแ€ฑแ€™แ€พแ€ฌแ€žแ€ฏแ€ถแ€ธแ€–แ€ญแ€ฏแ€ท use แ€›แ€„แ€บ แ€’แ€ฎแ€แ€ญแ€ฏแ€„แ€บแ€ธแ€œแ€ฑแ€ธแ€•แ€ฑแ€ซแ€ท

Laravel 7 แ€™แ€พแ€ฌ Model แ€€แ€ญแ€ฏ use แ€•แ€ฏแ€ถ
eg.

use App\Http\User;
use App\Http\Post;

Laravel 8, 9, 10 แ€™แ€พแ€ฌ Model แ€€แ€ญแ€ฏ use แ€•แ€ฏแ€ถ
eg.

use App\Http\Models\User;
use App\Http\Models\Post;

2. Routing

Laravel 7 แ€™แ€พแ€ฌ Route แ€แ€ฝแ€ฑแ€€แ€ญแ€ฏ แ€กแ€ฑแ€ฌแ€€แ€บแ€•แ€ซแ€กแ€แ€ญแ€ฏแ€„แ€บแ€ธ Routes/web.php แ€™แ€พแ€ฌ Register แ€œแ€ฏแ€•แ€บแ€€แ€ผแ€•แ€ซแ€แ€šแ€บแ‹
eg.

Route::get('/users', 'UserController@index');
Route::get('/users/create', 'UserController@create');
Route::get('/posts', 'PostController@index');
Route::get('/posts/create', 'PostController@create');

แ€กแ€žแ€ฏแ€ถแ€ธแ€•แ€ผแ€ฏแ€œแ€ญแ€ฏแ€แ€ฒแ€ท Controller แ€€แ€ญแ€ฏ use แ€แ€ฌแ€แ€ฝแ€ฑ แ€œแ€ฏแ€•แ€บแ€…แ€›แ€ฌแ€™แ€œแ€ญแ€ฏแ€แ€ฒแ€ทแ€•แ€ซแ€˜แ€ฐแ€ธแ‹ แ€›แ€ฑแ€ธแ€•แ€ฏแ€ถแ€€ แ€’แ€ฎแ€œแ€ญแ€ฏแ€•แ€ซ -

Route::get('แ€œแ€™แ€บแ€ธแ€€แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธ', 'Logicแ€›แ€ฑแ€ธแ€™แ€šแ€ทแ€บController@แ€กแ€ฒแ€ทแ€’แ€ฎControllerแ€‘แ€ฒแ€€Method');

แ€กแ€“แ€ญแ€•แ€นแ€•แ€ซแ€šแ€บแ€€ Browser URL แ€™แ€พแ€ฌ โ€˜/usersโ€™ แ€œแ€ญแ€ฏแ€ทแ€›แ€ญแ€ฏแ€€แ€บแ€œแ€ญแ€ฏแ€€แ€บแ€›แ€„แ€บ UserController แ€‘แ€ฒแ€€ index แ€†แ€ญแ€ฏแ€แ€ฒแ€ท Method แ€œแ€ฑแ€ธ แ€กแ€œแ€ฏแ€•แ€บแ€œแ€ฏแ€•แ€บแ€™แ€šแ€บแ€€แ€ญแ€ฏ แ€†แ€ญแ€ฏแ€œแ€ญแ€ฏแ€แ€ฌแ€•แ€ซแ‹ แ€แ€…แ€บแ€แ€ผแ€ฌแ€ธแ€Ÿแ€ฌ แ€แ€ฝแ€ฑแ€œแ€Šแ€บแ€ธ แ€‘แ€ญแ€ฏแ€”แ€Šแ€บแ€ธแ€แ€ฐแ€•แ€ซแ€•แ€ฒแ‹

Laravel 8, 9, 10 แ€™แ€พแ€ฌแ€แ€ฑแ€ฌแ€ท แ€’แ€ฎแ€œแ€ญแ€ฏแ€•แ€ซ -
eg.

use App\Http\Controllers\UserController;
use App\Http\Controllers\PostController;

Route::get('/users', [UserController::class, 'index']);
Route::get('/users/create', [UserController::class, 'index']);
Route::get('/posts', [PostController::class, 'index']);
Route::get('/posts/create', [PostController::class, 'index']);

แ€€แ€ญแ€ฏแ€šแ€บแ€กแ€žแ€ฏแ€ถแ€ธแ€•แ€ผแ€ฏแ€œแ€ญแ€ฏแ€แ€ฒแ€ท Controller แ€แ€ฝแ€ฑแ€€แ€ญแ€ฏ use แ€•แ€ฑแ€ธแ€›แ€•แ€ซแ€แ€šแ€บแ‹ แ€›แ€ฑแ€ธแ€•แ€ฏแ€ถแ€€ แ€’แ€ฎแ€œแ€ญแ€ฏแ€•แ€ซ -

Route::get('แ€œแ€™แ€บแ€ธแ€€แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธ', [Logicแ€›แ€ฑแ€ธแ€™แ€šแ€ทแ€บController::class, 'แ€กแ€ฒแ€ทแ€’แ€ฎControllerแ€‘แ€ฒแ€€Method']);

3. Pagination

Laravel 7 แ€™แ€พแ€ฌ Pagination แ€œแ€ฏแ€•แ€บแ€–แ€ญแ€ฏแ€ท แ€’แ€ฎแ€œแ€ญแ€ฏ แ€œแ€ฏแ€•แ€บแ€›แ€„แ€บ แ€›แ€•แ€ผแ€ฎแ‹
eg.

{{ $posts->links() }}

Laravel 10 แ€™แ€พแ€ฌแ€แ€ฑแ€ฌแ€ท Tailwind แ€€แ€ญแ€ฏ Default Frontend Design แ€กแ€–แ€ผแ€…แ€บแ€•แ€ผแ€ฑแ€ฌแ€„แ€บแ€ธแ€‘แ€ฌแ€ธแ€แ€ฌแ€™แ€œแ€ญแ€ฏแ€ท Laravel 7 แ€€แ€กแ€แ€ญแ€ฏแ€„แ€บแ€ธแ€›แ€ฑแ€ธแ€›แ€ฏแ€ถแ€”แ€ฒแ€ท แ€™แ€›แ€แ€ฑแ€ฌแ€ทแ€•แ€ซแ€˜แ€ฐแ€ธแ‹ แ€’แ€ฎแ€œแ€ญแ€ฏแ€›แ€ฑแ€ธแ€•แ€ฑแ€ธแ€›แ€•แ€ซแ€™แ€šแ€บ โ€ฆ

eg.

{{ $posts->links('pagination::bootstrap-5') }}

(แ€žแ€ญแ€ฏแ€ทแ€™แ€Ÿแ€ฏแ€แ€บ) Laravel 7 แ€€แ€กแ€แ€ญแ€ฏแ€„แ€บแ€ธแ€•แ€ฒ แ€›แ€ฑแ€ธแ€แ€ปแ€„แ€บแ€แ€šแ€บแ€†แ€ญแ€ฏแ€›แ€„แ€บ App\Providers\AppServiceProvider.php แ€™แ€พแ€ฌแ€’แ€ฎแ€œแ€ญแ€ฏ แ€œแ€ฑแ€ธแ€žแ€ฝแ€ฌแ€ธ แ€žแ€แ€บแ€™แ€พแ€แ€บแ€•แ€ฑแ€ธแ€›แ€•แ€ซแ€แ€šแ€บแ‹

use Illuminate\Pagination\Paginator;


public function boot(): void
{
Paginator::useBootstrapFive();
Paginator::useBootstrapFour();
}

Laravel 7 แ€”แ€ฒแ€ท Laravel 8, 9, 10 แ€›แ€ฒแ€ท แ€€แ€ฝแ€ฒแ€•แ€ผแ€ฌแ€ธแ€แ€ปแ€€แ€บแ€€ แ€’แ€ฎแ€œแ€ฑแ€ฌแ€€แ€บแ€•แ€ซแ€•แ€ฒ แ€œแ€ญแ€ฏแ€ทแ€แ€ฑแ€ฌแ€„แ€บแ€•แ€ผแ€ฑแ€ฌแ€œแ€ญแ€ฏแ€ทแ€›แ€•แ€ซแ€แ€šแ€บแ‹ Laravel 8 แ€€แ€”แ€ฑแ€…แ€•แ€ผแ€ฎแ€ธ แ€แ€…แ€บแ€แ€ผแ€ฌแ€ธ Starter Kits แ€แ€ฝแ€ฑ แ€”แ€ฒแ€ท แ€แ€…แ€บแ€แ€ผแ€ฌแ€ธ Service แ€แ€ฝแ€ฑ แ€‘แ€•แ€บแ€•แ€ซแ€œแ€ฌ แ€แ€ฝแ€ฑแ€œแ€Šแ€บแ€ธ แ€›แ€พแ€ญแ€•แ€ฑแ€™แ€šแ€ทแ€บ แ€กแ€•แ€ฑแ€ซแ€บ แ€€แ€Ÿแ€ฌแ€œแ€ฑแ€ฌแ€€แ€บแ€žแ€ญแ€‘แ€ฌแ€ธแ€›แ€„แ€บ Version แ€กแ€Ÿแ€ฑแ€ฌแ€„แ€บแ€ธแ€”แ€ฒแ€ท แ€žแ€„แ€บแ€•แ€ฑแ€ธแ€‘แ€ฌแ€ธแ€แ€ฒแ€ท Laravel Lecture แ€แ€ฝแ€ฑแ€€แ€ผแ€Šแ€ทแ€บแ€œแ€ญแ€ฏแ€ทแ€›แ€”แ€ฑแ€แ€ฏแ€”แ€บแ€ธแ€•แ€ซแ€•แ€ฒแ‹

แ€กแ€ฌแ€ธแ€œแ€ฏแ€ถแ€ธแ€กแ€†แ€„แ€บแ€•แ€ผแ€ฑแ€€แ€ผแ€•แ€ซแ€…แ€ฑแ‹

--

--