Posts

Showing posts from December, 2022

Center a div vertically and horizontally

Html file < div class = "content" > This works with any content </ div > Css file .content {     position : absolute ;     left : 50% ;     top : 50% ;     -webkit-transform : translate ( -50% , -50% );     transform : translate ( -50% , -50% ); }

How to use React Js with Laravel

Use React Js with Laravel: Download composer To create a laravel project > laravel new your-project-name cd: your-project-name To install react > npm install react react-dom  react-router-dom Install npm > npm install npm install @vitejs/plugin-react In vite.config.js: import { defineConfig } from 'vite' ; import laravel from 'laravel-vite-plugin' ; export default defineConfig ({     plugins : [         laravel ({             input : [ 'resources/css/app.css' , 'resources/js/app.js' ],             refresh : true ,         }),     ], }); Copy code import { defineConfig } from 'vite' ; import laravel from 'laravel-vite-plugin' ; import react from '@vitejs/plugin-react' export default defineConfig ({     plugins : [         laravel ({             input : [ 'resources/css/app....