Laravel Part-8
Laravel Part-8
-----------------------------------------------------------
There are three ways to add bootstrap in our file : -
a. Using CDN
b. Inside Public folder
c. Inside resources folder
8. Now, run the command npm run dev, This command will
run all mix tasks and all of your application’s CSS and JS
assets will be compiled and placed in your application’s
public directory (Non-minified code).
OR
Now, run the command npm run prod, This command will
run all mix tasks and all of your application’s CSS and JS
assets will be compiled and placed in your application’s
public directory (minified code).
OR
Route::get('about-page',function(){
return view(('aboutme'));
})->name('about');
// Controller page
Route::get(contact,[ContactController::class,'show'])->name(
'contact-us');
2. Once your have assigned a name to a given route, you may use the
route's name when generating URLs or redirects via Laravel's route
and redirect helper functions:
Example: -
route(‘abt’)
redirect() -> route(‘abt’)
4. If you pass additional parameters in the array, those key / value pairs
will automatically be added to the generated URL's query string:
Route::get('/user/{id}/profile', function ($id) {
//
})->name('profile');
$url = route('profile', ['id' => 1, 'photos' => 'yes']);
// /user/1/profile?photos=yes