An open API service indexing awesome lists of open source software.

https://github.com/astechedu/laravel8-ui-react

Laravel 8 Authentication with Laravel UI
https://github.com/astechedu/laravel8-ui-react

css html laravel-mix laravel-ui laravel8 mysqli php

Last synced: 4 months ago
JSON representation

Laravel 8 Authentication with Laravel UI

Awesome Lists containing this project

README

        

# Laravel 8 Authentication with Laravel UI

Step 1: Set Up Laravel Project.
Step 2: Set Up Database Details in ENV.
Step 3: Install Laravel UI.
Step 4: Step up Auth Scaffolding.
Step 5: Run npm install && npm run dev command.
Step 6: Migrate your database.
Step 7: Configuration

## Step 1: Set Up Laravel Project

composer create-project --prefer-dist laravel/laravel AnyAppName

## Step 2: Set Up Database Details in ENV

.env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=database_user_name
DB_PASSWORD=database_password

## Step 3: Install Laravel UI

composer require laravel/ui

## Step 4: Step up Auth Scaffolding

use anyone for you requirements

1. Without Auth:

php artisan ui bootstrap

php artisan ui vue

php artisan ui react

2. With Auth:

php artisan ui bootstrap --auth

php artisan ui vue --auth

php artisan ui react --auth

## Step 5: Run npm install && npm run dev command

npm install && npm run dev

## Step 6: Migrate your database

php artisan migrate

Now our Laravel 8 authentication system is ready. you can run serve

php artisan serve

## Step 7: Configuration

## 1. resources/js/components/Example.js

import React from 'react';

import ReactDOM from 'react-dom';

function Example() {

return (





Example Component

I'm an example component!





);
}

export default Example;

if (document.getElementById('example')) {

ReactDOM.render(, document.getElementById('example'));
}

## 2. resources/js/components/app.js

require('./bootstrap');
require('./components/Example');

## 3. resources/views/app.blade.php






Laravel








## 4. routes/web.php

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

![](https://avatars.githubusercontent.com/u/75734516?s=48&v=4)
:+1: