type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Support\Facades\View; | |
| use Illuminate\Support\ServiceProvider; | |
| use Illuminate\View\Factory as ViewFactory; | |
| class AppServiceProvider extends ServiceProvider | |
| { |
| <?php | |
| class Category extends Model | |
| { | |
| public function categories() | |
| { | |
| return $this->hasMany(Category::class); | |
| } | |
| public function childrenCategories() |
| <?php namespace App\Http\Controllers; | |
| use Illuminate\Pagination\LengthAwarePaginator; | |
| use Illuminate\Support\Collection; | |
| class SearchController extends Controller { | |
| public function search() | |
| { | |
| . |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| <?php | |
| <<<CONFIG | |
| packages: | |
| - "symfony/dom-crawler: ~2.3" | |
| - "symfony/css-selector: ~2.3" | |
| CONFIG; | |
| use Symfony\Component\DomCrawler\Crawler; | |
| $html = <<<HTML |
REST API response format based on some of the best practices
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
| function tableToJson(table) { | |
| var data = []; | |
| // first row needs to be headers | |
| var headers = []; | |
| for (var i=0; i<table.rows[0].cells.length; i++) { | |
| headers[i] = table.rows[0].cells[i].innerHTML.toLowerCase().replace(/ /gi,''); | |
| } | |
| // go through cells |