Views contain the html
code required by your application, and it is a method in Laravel that separates
the controller logic and domain logic from the presentation logic. Views are
located in the resources folder, and its path is resources/views.
We have different methods to passing data in to view
file
To change the title in dynamic form
Remove the title in user_form.php file
Then add the title in web.php file
Passing variables as Array in return
Refresh the web page and see the change
Rename the title value
Title was changed
Not only use one data it could be two are more data using this method
Another method is passing variable using compact()
Two titles are shown in about image web page
This method is little bit easy to compare the before
method.
But another one more method is like passing variables using with()
To check refresh the web page
Another method is passing variables using
withMAGIC()
In this method function with name eg :- with is fun,
Title is name like withTitle()
At the same it add a new variable with new value
Comments