view contain html code of our application
stored in resources/views/blades
return view()
Route::view('/wishlist', 'ui.wishlist')->name('wishlist_page');
nesting views
user/folder-1/view.blade
user/view.blade
return view('user.folder-1.view) called as nesting view
view exxists
if that blade available , it shows that blade,
use illuminate/support/facades/view;
if(view::exists('user.view_existence')
{
return view('user.vuew_existence');
} else
{
return 'viewis unavailbe'
}
passing data to views
by usingth ename array
in blade {{$brand_1}}
e {{$brand_1[0]}}
by using with function
functioin($id){
route::get('/with-function/{id}',[usercontroller:class,'withfunction']);
blade -> {{$id}}
by using
compact function
php artisan view:cache
_____ provide a convenient way to place all of our HTML in separate files.
Marked Answer : Views
Correct Answer : Views
Views stored in the ______ directory.
Marked Answer : resources/views
Correct Answer : resources/views
Which file extension informs the framework that the file contains a Blade template?
Marked Answer : .blade.php
Correct Answer : .blade.php
Which global helper is used to return view file?
Marked Answer : view
Correct Answer : view
Which View facade method is used to determine if view exists or not?
Marked Answer : exists
Correct Answer : exists
Which artisan command is used to precompile all of the views utilized by the application?
Marked Answer : view:cache
Correct Answer : view:cache
No comments:
Post a Comment