Skip to content

Instantly share code, notes, and snippets.

View bosz's full-sized avatar
💭
Digital Renter and Another Eye

Fongoh M. Tayong bosz

💭
Digital Renter and Another Eye
View GitHub Profile
@bosz
bosz / Inbox.screen.js
Created April 17, 2020 17:47
Digital Renter navigation bar component
// Please, update Line 52 to line 62 (handling the query) to
if (query) {
inboxes = inboxes.filter(inbox => {
let {headline, id} = inbox;
let client_name = inbox.client ? inbox.client.name : headline;
if (id == query || headline.includes(query) || client_name.includes(query) ) {
return true;
}else{
return false;
@bosz
bosz / laravel-s3-uploader.php
Created March 31, 2020 08:39
Optimize and upload a file to s3 bucket
use Illuminate\Support\Facades\Storage;
use Carbon\Carbon;
function hlp_file_upload($fileObj, $s3Path, $newDimension=null, $fname=null, $watermark = true)
{
$basePath = storage_path('app/uploads');
$ext = $fileObj->getClientOriginalExtension();
$ext = empty($ext) ? 'jpg' : $ext;
$oldFileName = $fname ? $fname : md5(uniqid(empty($_SERVER['SERVER_ADDR']) ? '' : $_SERVER['SERVER_ADDR'], true)) . '.' . $ext ;
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ClassController extends Controller
{
public function allClasses() {
return response()->json(
@bosz
bosz / List.md
Created July 25, 2016 11:48 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):