Coder Social home page Coder Social logo

laravel-react's Introduction

Getting Started with Create React App

Version

node -v (v21.0.0)
npm -v (v10.2.0)

npx create-react-app reactecom
cd reactecom
npm start

For React Router Dom

npm install react-router-dom

For Install Axios

๐Ÿ— Install Axios: Axios

npm install axios

For Bootstrap

๐Ÿ— Install Bootstrap: Bootstrap

npm install [email protected]

For Sweetalert

๐Ÿ— Install Sweetalert: Sweetalert

npm install sweetalert --save

Usage:

    import swal from 'sweetalert';
    swal("Hello world!");

Authenticating

CSRF Protection:To authenticate your SPA, your SPA's "login" page should first make a request to the /sanctum/csrf-cookie endpoint to initialize CSRF protection for the application:

    axios.get('/sanctum/csrf-cookie').then(response => {
      axios.post(`${constant.url}/api/register`, data).then((res) => {

      });
    });

For Admin Panel

๐Ÿ“ Admin Panel Download: Admin Panel

Hierarchy


๐Ÿ“‚ src
    ๐Ÿ“‚ assets
        ๐Ÿ“‚ admin
            ๐Ÿ“ assets
            ๐Ÿ“ css
            ๐Ÿ“ javascript
        ๐Ÿ“‚ frontend
    ๐Ÿ“‚ components
        ๐Ÿ“‚ admin
            ๐Ÿ— Dashboard.js
            ๐Ÿ— Profile.js
        ๐Ÿ“‚ Frontend
            ๐Ÿ“‚ auth
                ๐Ÿ— Login.js
                ๐Ÿ— Register.js
            ๐Ÿ— Home.js
    ๐Ÿ“‚ layouts
        ๐Ÿ“‚ admin
            ๐Ÿ— Footer.js
            ๐Ÿ— MasterLayout.js
            ๐Ÿ— Navbar.js
            ๐Ÿ— Sidebar.js
        ๐Ÿ“‚ frontend
            ๐Ÿ— Navbar.js
    ๐Ÿ“‚ routes
        ๐Ÿ— Routes.js

Errors:

image

if your are facing this error, you should add in your .env file.

SESSION_DOMAIN=localhost
SANCTUM_STATEFUL_DOMAINS=localhost

Connect

๐Ÿ”— You can find me on Stack Overflow: Stack Overflow Profile

๐ŸŒ Connect with me on LinkedIn: LinkedIn Profile

laravel-react's People

Contributors

muhammad-umaair avatar muhammadumaair avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.