Laravel Blade 101 | Laravel 10 Tutorial #6

preview_player
Показать описание
Laravel 10 Tutorial for beginners
On this episode we cover the basics of laravel blade, learn most common directives and learn how to pass data from our controller to our views.

Playlist of Laravel 10 Tutorial Course :

If you're new to Laravel 10 and want to learn about the Blade templating engine, then this is the video for you! In this video, we'll be covering all the basics of the Blade templating engine in Laravel 10. By the end of the video, you'll have a good understanding of how blade works and will be ready to start creating your own templates in Laravel 10!

What is Laravel :
Laravel is a free and open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller architectural pattern and based on Symfony.

If you have any questions or problems please leave a comment.
Рекомендации по теме
Комментарии
Автор

this was actually a great way to show how blade abbreviates the mixed html/php code! thanks for sharing :)

Terik
Автор

Thank you very much! Please keep on creating content for Laravel and Livewire.

jessieaguiao
Автор

I've learned a lot from this video

wormy_coder
Автор

Hi Mr Matin,
Excellent tutorials. The best I think.
Just regarding cluttering of code mixing pure PHP and HTML code, The best solutions for that is to write both in HTML between double quotes and echo the lot. In PHP Using @[] you can also insert new lines, to the PHP code will only be "html code" . phpcode . "more html code" or "html all the way with $php in between"

happylittlemonk
Автор

Explained really well . pls continue with laravel livewire

RustyPack-fmgi
Автор

Thanks for the video very useful i just have one Question what do you use to record your screen? 💙

daryanslipp
Автор

The blogger's theme is very beautiful. Can you tell me which one it is

JIwuLiMN
Автор

the @if and @endif is possible in vanilla PHP too

<?php if ($isConditionTrue) : ?>

<!-- HTML content to be displayed if the condition is true -->

<?php endif; ?>


to access variables and such you'd have to do this:

<?php if ($isConditionTrue) : ?>

<p> <?= $variable ?> </p>

<?php endif; ?>

which is a bit unclean, but it's the way I've structured stuff and just used includes to make my sites "modular".

"<?=" is a short hand for <?php & echo
:)

Vichion
Автор

Bro, I have a question: What extensions are you using?
I have 6 (Laravel Blade Snippets, Laravel Snippets, Laravel Artisan, Laravel Extra Snippets, Laravel goto view and Laravel Blade Spacer) but I can't see or do what you are seeing and doing.
Thanks!

drfcozapata
Автор

@3:17 I got an error message "Undefined variable $nameList". how will I solve this? Here is my index controller code.

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class indexcontroller extends Controller
{
public function index(){
$users = [
[
'Name'=> 'B. Lalruatsanga',
'Age'=> 18,
'Designation'=> 'President'
],
[
'Name'=> 'Lalruatfeli',
'Age'=> 20,
'Designation'=> 'Asst. Secretary'
],

];
return view("welcome", [
'nameList'=>$users
]);
}
}

zopaprogramming