Skip to content

Instantly share code, notes, and snippets.

@tomstorms
Created December 27, 2021 02:23
Show Gist options
  • Save tomstorms/b605f467d9d2f05210625649f1a91abb to your computer and use it in GitHub Desktop.
Save tomstorms/b605f467d9d2f05210625649f1a91abb to your computer and use it in GitHub Desktop.
#-----------------------------------------------------
# For basics, see: https://laracasts.com/series/laravel-from-scratch-2018
#-----------------------------------------------------
# Laravel + Lando.dev
- lando init
- lando laravel new myfirstsite
- cd myfirstsite (or move files to the root)
- composer require laravel/ui (https://laravel.com/docs/7.x/frontend)
- php artisan ui vue --auth
- npm install && npm run dev
#-----------------------------------------------------
# install vuetify (with tree shaking):
- npm install vuetify
- npm install sass sass-loader fibers deepmerge -D
- npm install vuetify-loader
- create a new folder and file under /resources/plugins/vuetify.js and paste in:
import Vue from 'vue'
import Vuetify from 'vuetify/lib'
Vue.use(Vuetify)
const opts = {}
export default new Vuetify(opts)
- npm install --save-dev case-sensitive-paths-webpack-plugin
- edit: webpack.mix.js:
const mix = require('laravel-mix'); // existing line
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin');
const CaseSensativePathsPlugin = require('case-sensitive-paths-webpack-plugin');
var webpackConfig = {
plugins: [
new CaseSensativePathsPlugin(),
]
}
mix.webpackConfig(webpackConfig);
mix.extend('vuetify', new class {
webpackConfig (config) {
config.plugins.push(new VuetifyLoaderPlugin())
}
});
mix.vuetify();
- resources/js/app.js:
import Vuetify from "../plugins/vuetify";
...
const app = new Vue({
vuetify: Vuetify,
el: '#app',
});
- npm run watch
#-----------------------------------------------------
# Socialite
#
# See: https://laravel.com/docs/7.x/socialite
#
composer require laravel/socialite
#-----------------------------------------------------
# Basics:
- resources/views = HTML files
- routes/web.php = routing
#-----------------------------------------------------
# User Permissions and Roles
#
# See: https://docs.spatie.be/laravel-permission/v3/installation-laravel/
#
#-----------------------------------------------------
# Controllers: (controller names should be plural)
php artisan make:controller Users
app/http/controllers/Users.php
#-----------------------------------------------------
# Setup Login UI & bootstrap
try using lando php artisan or php artisan
composer require laravel/ui
php artisan ui bootstrap
php artisan ui bootstrap --auth
#-----------------------------------------------------
# Build login
#
# See: https://www.youtube.com/watch?v=kHsQe8VzQRM&list=PLxFwlLOncxFLazmEPiB4N0iYc3Dwst6m4&index=5
#
#-----------------------------------------------------
# Lando Artisan Commands:
lando php artisan migrate - to push db changes
lando php artisan migrate:reset - to push db changes
lando php artisan db:seed - to populate db
---
lando php artisan cache:clear - clear application cache
lando php artisan route:clear - clear route cache
lando php artisan config:clear - clear config cache
lando php artisan view:clear - clear view cache
-----
lando php artisan make:controller TogglController
lando php artisan make:model TogglProject
----
lando php artisan make:factory UserFactory
lando php artisan migrate:fresh --seed
#-----------------------------------------------------
# die and done Commands:
dd($variable) - (die and done) dumps variable data
#-----------------------------------------------------
# reload composer autoloading config:
composer dump-autoload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment