Skip to content

Instantly share code, notes, and snippets.

View brndnmg's full-sized avatar

Brendon M. Gleeson brndnmg

  • Hyve Mobile
View GitHub Profile
@spicydog
spicydog / .gitlab-ci.sh
Created August 29, 2020 16:41
SPICYDOG's Podcast EP 4 : Sample Scripts
#!/bin/sh
# exit with error
set -e
# Generate an application key. Re-cache.
php artisan config:cache
php artisan config:clear
php artisan cache:clear
stages:
- composer_validate
- static_analysis
- tests
# overlay2 storage driver is more fast, default is vfs.
variables:
DOCKER_DRIVER: overlay2
cache:
paths:
- vendor/
@nasirkhan
nasirkhan / laravel-controller-method-commands.php
Last active March 31, 2023 04:11
Call Laravel Controller methods via command line
<?php
php artisan tinker
$controller = app()->make('App\Http\Controllers\MyController');
app()->call([$controller, 'myMethodName'], []);
//the last [] in the app()->call() can hold arguments such as [user_id] => 10 etc'