Skip to content

Instantly share code, notes, and snippets.

View ovanschie's full-sized avatar
💻

Olav van Schie ovanschie

💻
View GitHub Profile
@ovanschie
ovanschie / webpack.mix.js
Created December 1, 2020 09:11
Laravel mix purge css | include vendor packages
require('laravel-mix-purgecss');
let packages = require('./package.json');
mix.purgeCss({
extend: {
content: Object.keys({...packages.devDependencies, ...packages.dependencies }).flatMap((dependency) => {
return [
path.join(__dirname, 'node_modules/'+ dependency +'/**/*.js'),
path.join(__dirname, 'node_modules/'+ dependency +'/**/*.vue'),
php artisan migrate
php artisan optimize
@ovanschie
ovanschie / Controller.php
Last active June 28, 2017 13:33
Bootstrap pagination controller
<?php
// use BootstrapComponents; on top
public function rows(Request $request)
{
$page = $request->get('page', 1);
$perPage = 15;
$items = collect($myItems);
@component('bootstrap::modal')
@slot('title')
Modal title
@endslot
<p>Modal body text goes here.</p>
@slot('footer')
<button type="button" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<div class="modal fade">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
@ovanschie
ovanschie / Notify.php
Last active September 3, 2015 21:31
PHP script to add or mark Magento admin notifications. Use on commandline: php notify.php <arguments>
<?php
/**
* Script to add or mark Magento admin notifications
*
* @author Olav van Schie
* @version 0.1
*/
$magePHP = 'app/Mage.php';