Day 122: setting up blog route

Dan Esmail - 5/2/2023

Intro

Now that the components are ready to go I need to create routes that will take the day and spite out the right blog. I have accomplished that by using this for my route


PHP
Laravel Routes

                
                    
    Route::get('/Blog', function() {
    return view('Blog');
    });


    Route::get('/Blog/{day}', function(string $day) {
    return view('Blog.Day'.$day);
    });

                
            

This way I can just have the URL be something like Blog/Day and just be done with this. I did have to change up the Javascript and the links to make this work the way that I want it to.


Day 1

Day 1