Skip to content

Instantly share code, notes, and snippets.

View badasukerubin's full-sized avatar
🏠
Working from home

Toluwani Adewale badasukerubin

🏠
Working from home
View GitHub Profile
@rwaldron
rwaldron / branch-count.sh
Created June 15, 2011 16:08
Count number of branches in a repo
git branch | wc -l
@RuGa
RuGa / massInsertOrUpdate.php
Last active June 3, 2024 15:50
Mass (bulk) insert or update on duplicate for Laravel 4/5
/**
* Mass (bulk) insert or update on duplicate for Laravel 4/5
*
* insertOrUpdate([
* ['id'=>1,'value'=>10],
* ['id'=>2,'value'=>60]
* ]);
*
*
* @param array $rows
@jeffochoa
jeffochoa / Response.php
Last active May 22, 2024 04:06
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@greyscaled
greyscaled / README.md
Last active September 19, 2022 08:59
Sequelize + Express + Migrations + Seed Starter
@whoisryosuke
whoisryosuke / laravel-loop-through-old-flash.php
Created May 16, 2018 23:58
Laravel - Get old form input values for array-based input
<?php
@if(old('uid_tag'))
@foreach(old('uid_tag') as $product)
<input type="text" name="uid_tag[]" value="{{ old('uid_tag')[$loop->index] }}" size="30" />
<textarea
placeholder="Include weight or count"
name="product_description[]"
cols="45"
rows="1"
value="{{ old('product_description')[$loop->index] }}"