Laravel 8 tutorial # View

preview_player
Показать описание
in this laravel 8 video tutorial, we learn what is view and how to view in laravel 8 project. this video is made by anil Sidhu in the Hindi language
we also learn new update which is coming with laravel 8th version
laravel full course with every topic
steps of this video
What is View
Make View
Call View
Pass Data in View
Interview Question for view
Laravel 9 tutorial

laravel 8 complete playlist
Рекомендации по теме
Комментарии
Автор

Please support me by Subscribe, Like and Comment... Thank you :)

codestepbystep
Автор

Thanks for this series. Finding it really helpful.

samharvey
Автор

CLI doesn't provide graphical enhancements, and views use HTML. So, views cannot be created by the terminal.

pragyakumari
Автор

THANXX FOR MAKING SUCH A WONDERFULL TUTORIAL BCOZ OF YOU GUYS BEGINNERS HAVE HOPE TO SUCCEED

vrushabhpatil
Автор

Thank you for that wonderful explanation!🥰

samsungmaverick
Автор

@Code Step By Step

You said in last video I will answer in next video by you not explain here. Why the laravel change the way of calling controller.
Also You should answer the previous questions in the next video so that we confirm the answer.

muhammadwaleedafzal
Автор

Q: Why we cannot use something like php artisan make:view Users
This is because views are just a file and not a class

Here is the long version

in the file /artisan, we have
$app = require_once __DIR__.'/bootstrap/app.php';
$kernel =
$status = $kernel->handle(...

in the file bootstrap/app.php we have
$app = new
return $app;

so we check this object and see what is happening
in the file we have
use
class Application extends Container
and
public function make(...
return parent::make(...

so we need to check what happens in the parent class

in the file we have
public function make(...
return $this->resolve(...
and
protected function resolve(...
return $object;

to see what is returned here, put this debug code just before the return
if(is_string($object)) {
echo "string ".$object;
echo "\n";
}else{
echo get_class($object)."\n";
}

Now run php artisan make:controller trash and see what you get
You will get a list like
...
...


...
...

in the file we have
class ResourceMakeCommand extends GeneratorCommand

public function handle(
parent::handle();

So this is the method called for
$status = $kernel->handle(... as mentioned on the very top

in we have
public function handle()
and there we have this line
$name =

This is what we have for the function protected function qualifyClass($name)
Parse the class name and format according to the root namespace.

So we need a class type for the make command.

Since component is a class type, we can write
php artisan make:component test as mentioned by @Jay Bab

sghosh
Автор

Man he love batman, iron man and iron man Jr so muchh 🔥

kunalbiswas
Автор

i tried using php artisan make:componet test ; blade file was created with name test.blade.php file in component folder with div tag in view folder

jaybab
Автор

If you need to determine if a view exists, you may use the View facade. The exists method will return true if the view exists:

use

if (View::exists('page-name')) {
//
return view('page-name');

}
else{
echo "Page Not Found ";
}

mhsmartgaming
Автор

can you please tell me why we write capital letter A for app directory while writing the path of controller in the web.php file

idrees
Автор

Could please able to explain why we can not make view from command line?

zeelmehta
Автор

Please make video on Api integration also through laravel

narayanjena
Автор

use
if (View::exists(‘ViewName’)) {
//
return view('ViewName');
}

shahzadmiraj
Автор

on interview question 2, answer is YES because the error can also be seen in terminal of vscode

kamaliB
Автор

Hello sir, angular pe next video upload kro

jayeshkhairnar
Автор

if we can directly route view using view path than why to make controller & set its path n all all

rahul_manek
Автор

Does Route::view bypass the controller completely?

NoahNobody
Автор

if(view()->exists($view)){
return view($view)->render();
}
return "Page not found";

prr-jjem
Автор

check view is possible

if (view()->exists('view_name')) {
// The view exists, so you can safely return or render it.
return view('view_name');
} else {
// The view does not exist, handle the error or perform some fallback action.
// For example, you can return an error view or throw an exception.
return view('error_view');
}

jemailmedamine-srgh