This will get you started on getting your first React/Laravel application deployed to your server. We'll cover everything from installation to deployment. Start by reading the installation instructions on https://laravel.com/docs/6.x#installing-laravel . We'll cover those details below. Setting Up Laravel Check that you have the latest version of PHP installed on your computer. It must be >= 7.2.0. Open terminal to get the Laravel installation tool. Type in composer global require laravel/installer Type in laravel to verify installation. Navigate to a directory on your computer where you want to install your project on your terminal. Run the following command: laravel new project_name (replace project_name with your project name). Once complete, cd into your new project. Type the following command: php artisan serve. You'll get a message like the following if it's running successfully: Laravel development server started: http://127.0.0.1:8000
If you need instructions on how to setup Bootstrap's navbar, follow my previous post. We'll start by creating the Navigation component. import React from 'react' ; import './Navigation.css' ; let navbar ; let sticky ; class Navigation extends React . Component { render () { return ( < nav id = "main-navigation" className = "navbar navbar-expand-lg navbar-light" > ... We needed to import the Navigation.css file. This is where we'll create our sticky CSS class. /* The sticky class is added to the navbar with JS when it reaches its scroll position */ .sticky { position : fixed ; top : 0 ; width : 100% ; z-index : 100 ; } We created our variables, navbar and sticky. They will be initialized after the page renders. Next, we'll need to add the componentDidMount() lifecycle method to the Navigati