ghazniali95/react-with-laravel-blade

React component laravel vite helper.

v1.0.0 2024-03-29 09:05 UTC

This package is auto-updated.

Last update: 2024-09-29 10:28:22 UTC


README

Author: Ghazni Ali Contact: GitHub Profile

Overview

The ReactWithLaravelBlade package simplifies the process of creating React components directly within Laravel Blade templates. To use this package, ensure you have Laravel and Vite installed and configured in your project.

Usage

Setup Development

  1. Run the following command to start the development server:

    npm run dev
    
  2. After setting up Laravel with Vite and React, run the Laravel server with:

     php artisan serve
    

Installation

To install the package, run the following Composer command:

composer require ghazniali95/ReactWithLaravelBlade

Usage

Creating a React Component

Once the package is installed, you can use the following Artisan command to create a new React component:

php artisan create:reactComponent [ComponentName]

Passing Arguments to React Components

To create a React component that accepts arguments, use the following Artisan command:

php artisan create:reactComponent [ComponentName] --arg=arg1,arg2,arg3,...

This will generate a component that can receive arguments.

Building Components

For the build process, you need to add all the created components to the vite.config.js file in your project's root directory.

Future Improvements

We are actively working on improving this package to enhance your development experience. Your feedback and contributions are valuable to us! Contact

Author: Ghazni Ali
GitHub Profile: Ghazni Ali on GitHub

Feel free to contribute to the project or report any issues on the GitHub repository.

This README.md file provides clear and organized information on how to install and run the package.