PHP code example of fsac / laravel-react-make

1. Go to this page and download the library: Download fsac/laravel-react-make library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fsac / laravel-react-make example snippets


'base' => resource_path('ts'),

'prefix' => 'Components',

'defaults' => ['typescript' => true],
bash
php artisan make:react MyComponent
bash
php artisan make:react PrimaryButton
# -> resources/js/components/PrimaryButton.jsx
bash
php artisan make:react buttons/Primary
# -> resources/js/components/buttons/Primary.jsx
bash
php artisan make:react /pages/Settings
# -> resources/js/pages/Settings.jsx
bash
php artisan make:react --typescript PrimaryButton
# -> resources/js/components/PrimaryButton.tsx
bash
php artisan make:react --extension js PrimaryButton
# -> resources/js/components/PrimaryButton.js
bash
php artisan vendor:publish --tag react-config
bash
php artisan vendor:publish --tag react-stub