Skip to content

Instantly share code, notes, and snippets.

@ahmadshuami
Last active February 2, 2023 08:11
Show Gist options
  • Save ahmadshuami/9e703efcf3e8b23d7cc0f7e865d13009 to your computer and use it in GitHub Desktop.
Save ahmadshuami/9e703efcf3e8b23d7cc0f7e865d13009 to your computer and use it in GitHub Desktop.
## Composer
- Download the installer and install (https://getcomposer.org/download/)
## Node.js
= Download the installer and install (choose LTS version, https://nodejs.org)
## Laravel Installer as a global Composer dependency:
- Open cmd prompt
= Enter composer global require laravel/installer
= Enter laravel --version to check laravel installer version
## Update / upgrade laravel installer
- Open cmd prompt
= Enter composer global remove laravel/installer
= Enter composer global require laravel/installer
## Create new app using laravel installer
$ laravel new project-name
OR
## Create new app using composer
$ composer create-project laravel/laravel="8.*" project-name
***=> replace with your choice of version
## What Next
## Install laravel ui
- Open cmd prompt, locate your application directory,
= Enter composer require laravel/ui
= Enter php artisan ui bootstrap --auth
= npm i && npm run dev
## vite.config.js
-------------------------------------------------------------------------------------
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import path from 'path';
export default defineConfig({
plugins: [
laravel({
input: [
// 'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
],
resolve: {
alias: {
'~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
}
},
});
-------------------------------------------------------------------------------------
## app.js (resources/js/app.js)
-------------------------------------------------------------------------------------
import './bootstrap';
import 'jquery-ui';
import.meta.glob([
'../favicons/**'
]);
import '../sass/app.scss';
-------------------------------------------------------------------------------------
## Build
- npm run build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment