Laravel از صفر (نسخه ۲۰۲۶)
Laravel From Scratch (2026 Edition)
Welcome to the latest iteration of the longest running Laravel introductory video series in the world. Like clockwork, we refresh this series every two years. This latest 2026 iteration covers Laravel 12 and beyond.
You'll learn not only the basic fundamentals of Laravel, but also how to leverage more advanced features like authentication, authorization, queues, testing, and more. We'll even review the full deployment process from scratch.
قسمتهای دوره
The Fundamentals (13)
خوش آمدید
34sJoin Jeffrey Way for Laravel From Scratch 2026 — a friendly, hands-on intro to modern Laravel fundamentals, tools, and best practices.
محیط توسعه خود را راهاندازی کنید
7m 27sSet up your Laravel dev environment with Laravel Herd: install PHP, Composer, Node, scaffold a project, and explore routes/web.php and welcome view.
مسیریابی ۱۰۱
5m 26sLearn Laravel routing: use Route::get and view(), add /about and /contact pages, and link between routes with ease.
فایلهای چیدمان
16m 10sDRY up views with Blade layouts: extract shared markup, use $slot, pass title props, Route::view, and merge $attributes for flexible components.
انتقال داده به ویوها
5m 36sPass data to Blade views in Laravel: use Route::view's third param or view(...), read query with request(), and rely on Blade escaping.
دستورات Blade
7m 39sMaster Blade directives: use @dump/@dd for debugging and clean control flow with @if, @foreach, and @forelse. Quick tips.
Build a tiny Laravel notebook: handle POST forms with @csrf, use request() to capture input, store ideas in session, and redirect home.
دیتابیسها، مهاجرتها و Eloquent
23m 59sMaster Laravel migrations, Eloquent models, and queries: create an ideas table, run artisan migrate, use Idea::create() and where() to filter ideas.
درخواستهای HTTP و REST
24m 49sBuild a RESTful CRUD flow for ideas: list, show, edit, update, delete, confidently using Laravel route model binding and method spoofing.
Organize Laravel routes with an IdeaController: move the form to ideas/create, implement seven resourceful actions, and centralize route logic.
اعتبارسنجی درخواست
12m 47sAdd request validation in Laravel: use request->validate, display errors with @error, and extract a reusable x-error component for cleaner forms.
کلاسهای درخواست فرم
8m 39sMove validation into a Form Request: scaffold StoreIdeaRequest, use authorize() and rules(), customize messages, and simplify controller validation.
یک انحراف کوتاه به DaisyUI
12m 48sPolish UI quickly with Tailwind and DaisyUI: build nav, cards, and form controls; extract a nav component and reusable idea-card.
Authentication and Authorization (5)
احراز هویت توضیح داده شده
24m 41sLearn Laravel authentication: implement register and login, validate input, hash passwords, add logout, and use @auth/@guest.
نیاز به احراز هویت با میانافزار
13m 36sAssociate ideas with users using foreignIdFor and cascading deletes, apply auth/guest middleware, use Auth::id(), and show each user's ideas.
روابط Eloquent
7m 40sDefine Eloquent relations: Idea belongsTo creator, User hasMany ideas; use auth()->user()->ideas()->create() and fix view security holes.
مجوزدهی با استفاده از Gateها
15m 22sSecure your Laravel app with Gates: define them in your provider, use @can for UI, and protect routes with can() or Gate::authorize.
مجوزدهی با استفاده از سیاستها
15m 39sCentralize Laravel authorization with an IdeaPolicy: implement an update rule, use $this->authorize or middleware, and handle Idea::class.
Digging Deeper (4)
بستهبندی داراییهای فرانتاند با Vite
8m 54sBundle Tailwind/DaisyUI locally with Vite: configure @vite, edit resources/css/app.css, and use npm run dev/build for optimized assets.
Notify idea owners with Laravel Notifications: scaffold IdeaPublished, preview emails with Mailpit, and dispatch from IdeaController@store.
چه زمانی آن را به صف اضافه کنیم
12m 44sMove notifications to the background with ShouldQueue: push jobs, run php artisan queue:work, and inspect the jobs table to keep users fast.
چگونه تست کد خود را شروع کنید
18m 44sLearn Pest PHP and browser testing: automate user flows with Playwright, write practical registration and /ideas tests using data-test attributes.
Final Project: Build and Deploy an App (21)
راهاندازی نهایی پروژه
14m 29sBuild and deploy a feature-rich Idea app: init repo, push to GitHub, deploy with Forge, and add Pint, Rector, Code Rabbit, and Laravel Boost.
لایه مدل خود را طراحی کنید
18m 40sScaffold Idea and Step models with migrations, factories, an IdeaStatus enum, relationships, defaults, and tests for a solid data foundation.
راهاندازی تم Tailwind و رابط کاربری اولیه
34m 14sSet up a Tailwind theme and reusable UI: create layouts, nav, form/field components, and wire register/login routes for faster page building.
تست مرورگر فرمهای ثبتنام با Pest
9m 55sWrite Pest browser tests for Laravel registration, login, and logout: use user factories, data-test selectors, and debug to verify happy/error paths.
پیامهای فلش و تعامل با AlpineJS
6m 57sMake Laravel flash messages come alive with Alpine.js: add a tiny x-data component using x-show, transition, and a timeout to auto-fade alerts.
کارتهای ایده
20m 31sBuild polished idea cards for /ideas: create route/controller, extract reusable Blade components (x-card, x-idea-status), and prep for filtering.
فیلتر کردن ایدهها
21m 44sAdd status filtering to ideas via the query string and an Eloquent scope; display filter pills with counts handled in the Idea model.
نمایش یک ایده
11m 13sBuild a functional single-idea page: create show.blade.php, wire IdeaController@show, render title, links, nav, and a delete form.
ایجاد یک مودال کاربردی با AlpineJS
16m 12sBuild an accessible AlpineJS modal: open via events, use x-data/x-show with transitions, add escape/click-away handlers, extract reusable x-modal.
ساخت فرم ایده
19m 12sBuild an idea form: wire to POST /ideas, make a textarea-aware field, add an Alpine status selector, add client-side validation and persist ideas.
تست فرم ایجاد ایده
6m 30sAutomate testing of your idea form with browser tests: add data-test attributes, simulate clicks/fills as a user, and assert persistence.
اجازه دادن به یک یا چند لینک
17m 40sEasily add one-or-many link inputs to ideas: use Alpine x-model and an add button, submit links[] array, and validate server-side.
مراحل عملی
16m 24sAdd actionable steps to ideas: reuse modal, bind Alpine inputs to a steps array, validate and persist them, render and toggle completion.
آپلود تصاویر ویژه در فضای ذخیرهسازی
9m 33sAdd featured image uploads to ideas: use a file input, store files with Laravel storage, expose via storage:link and show in views.
کلاسهای اکشن
11m 7sRefactor idea creation into a reusable CreateIdea action: remove logic from controllers, use handle(), constructor injection and CurrentUser.
مجوزدهی یک الزام است
12m 24sSecure your app with Laravel authorization: implement gates and an IdeaPolicy, use authorize/can middleware, and add tests to lock access.
مودال ویرایش ایده
23m 33sEdit ideas with a reusable Alpine modal: extract modal into a component, test the edit flow, and make open-modal dispatch work on show page.
اکشن بهروزرسانی ایده
16m 24sImplement an UpdateIdea action: handle image uploads, update attributes, sync object-based steps, and secure the flow with browser and unit tests.
پروفایل خود را ویرایش کنید
18m 17sAdd profile edit flow: build /profile/edit with populated form, validate updates, handle password and email changes, notify and test.
استقرار و سپس پیادهسازی درخواست ویژگی
11m 27sDeploy to Forge, run tests, format code, then add a formatted_description accessor with Str::markdown and Tailwind typography for polished markdown.
از اینجا به کجا برویم
2m 20sImprove your finished Laravel app: add team collaboration and advanced authorization, or explore Livewire or Vue/React with Inertia for richer SPAs.




