Skip to content

Instantly share code, notes, and snippets.

{
"private": true,
"scripts": {
"watch": "concurrently -r \"npm run watch:client\" \"npm run watch:ssr\"",
"watch:client": "cross-env MIX_CNF=client NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch:ssr": "cross-env MIX_CNF=server NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
}
}
@cajoue
cajoue / pivot-tables.md
Created June 30, 2021 07:20 — forked from Braunson/pivot-tables.md
Laravel 8.x - Diving into Pivot Tables

Laravel 6 - Diving Into Pivot Tables

Pivot tables can be confusing and a little hard to wrap your head around at first. In this quick article we are going to dive into what a pivot table is, how to create one and finally how to use the pivot table. Let's dive in!

What is a pivot table?

A pivot table is used to connect relationships between two tables. Laravel provides a Many To Many relationship where you can use a pivot table.

@cajoue
cajoue / .gitignore
Created May 7, 2021 12:33 — forked from sendoa/.gitignore
Sendoa's .gitignore for Laravel+PHPStorm projects
/node_modules
/public/storage
/storage/*.key
/vendor
Homestead.yaml
Homestead.json
.env
# ====== OS X ===========================================
.DS_Store
@cajoue
cajoue / docker-help.md
Created March 13, 2021 17:09 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@cajoue
cajoue / gist:1af7fcedf06fa5cd345fc966090e9af5
Created February 6, 2017 13:08 — forked from afeld/gist:4952991
good APIs for mashups
1. Highlight a recommended option,

2. Allow users to switch currency (€/$/£)

3. Allow users to switch pricing monthly/yearly

4. Keep the entire pricing plan area clickable

5. Use slider to calculate how much a user would save

6. Provide free first month for good engagement

7. Prominently highlight testimonials prominently

8. Repeating call to action on top and bottom

9. Sell benefits instead of features

10. Indicate that users can cancel any time

<?php
// The code below finds the menu item with the class "[CPT]-menu-item" and adds another “current_page_parent” class to it.
// Furthermore, it removes the “current_page_parent” from the blog menu item, if this is present.
// Via http://vayu.dk/highlighting-wp_nav_menu-ancestor-children-custom-post-types/
add_filter('nav_menu_css_class', 'current_type_nav_class', 10, 2);
function current_type_nav_class($classes, $item) {
// Get post_type for this post
$post_type = get_query_var('post_type');
@cajoue
cajoue / MemeMaker.html
Created November 10, 2015 15:29 — forked from jwill/MemeMaker.html
Starter code for Meme Maker
<!DOCTYPE html>
<html>
<head>
<title>MemeMaker-Simple</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<style>