Giter VIP home page Giter VIP logo

laravite-vue3's Introduction

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

About Laravite-vue3

Just a simple way to start a laravel vite project with vuejs.

  • create new laravel app
$ laravel new laravite-vue3
  • cd into the project.
  • add in tag head vite
 @vite(['resources/css/app.css', 'resources/js/app.js'])
  • go to view welcome blade and delete all inside body tag. create a div with id app.
    <body class="antialiased">
        <div id="app"></div>
    </body>
  • now lets install vue and plugin vitejs
$ npm i vue@next -D
$ npm i @vitejs/plugin-vue -D
  • import vue on vite.config file
    import { defineConfig } from 'vite';
    import laravel from 'laravel-vite-plugin';
    import vue from '@vitejs/plugin-vue';

    export default defineConfig({
        plugins: [
            laravel({
                input: ['resources/css/app.css', 'resources/js/app.js'],
                refresh: true,
            }),
            vue({
                template: {
                    transformAssetUrls: {
                        base: null,
                        includeAbsolute: false,
                    }
                }
            }),
        ],
    });

  • go to resources js folder and create a Welcome.vue file. Just put a welcome text like:
<template>
  <h1>Welcome from vuejs</h1>
</template>
  • go to resources js folder and open app.js delete all and add:
import { createApp } from 'vue';
import Welcome from './Welcome.vue';


createApp(Welcome).mount('#app');

  • open a terminal on project and run:
$ npm run dev
  • All set!, now open the app on web browser and you should see thw welcome text from vue.

Happy Coding! ๐Ÿ’ป See you all! Bye ๐Ÿ‘‹
Fidel Duran

laravite-vue3's People

Contributors

fduran82 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.