Giter VIP home page Giter VIP logo

vueon's Introduction

Vueon

Instalcja Vue z Vite w Laravelu w wybranym katalogu (vue-project).

Project Laravela

composer create-project laravel/laravel:^9.0 demo

Dodaj pakiet atomjoy/vueon

cd demo
composer require atomjoy/vueon 1.0.*
composer update
composer dump-autoload -o

Utwórz projekt Vue w Laravel

npm init vue@latest
cd vue-project
npm install
cd ..

Konfiguracja Vite

# Laravel root dir
php artisan vendor:publish --tag=vueon-config --force

Dodaj routes

<?php
// Laravel routes
Route::get('/welcome', function () {
    return view('welcome');
});

// Laravel login auth redirect url
Route::get('/login', function () {
    return view('vueon::vue');
})->name('login');

// Vue all routes
Route::fallback(function () {
    return view('vueon::vue');
});

Uruchom aplikację

demo/vue-project

cd vue-project
# Vue build
npm run build
# Clear Laravel view cache
php artisan view:clear
# Php Laravel server
php ../artisan serve

Wyczyść view cache (dev mode)

Jeżeli przeglądarka nie pokazuje aktualnej strony lub pokazuje błąd wczytywania plików index.[hash].js wyczyść view cache w Laravelu i uruchom localny server ponownie.

php artisan view:clear
php artisan serve

Lub wyłącz view cache w Laravel (dev mode)

Dodaj do pliku config/view.php

<?php
return [
    'cache' => false,
    // ...
]

Instalacja pakietów Vue

cd vue-project
npm install --save-dev axios
npm install --save-dev vue-i18n@9
npm install --save-dev @googlemaps/js-api-loader

vueon's People

Contributors

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