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 / 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):

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ClassController extends Controller
{
public function allClasses() {
return response()->json(
@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 ;
@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;
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Subject;
class SubjectController extends Controller
{
@bosz
bosz / UserController.php
Created June 12, 2020 10:42
Fongoh's class: Learning Laravel with Aiysha
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class UserController extends Controller
{
public function index()
{
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link id="bsdp-css" href="https://unpkg.com/[email protected]/dist/css/bootstrap-datepicker3.min.css" rel="stylesheet">
<title>JS Bin</title>
@bosz
bosz / index.html
Created February 16, 2021 07:44
Learning Vue JS 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Learning Vue JS</title>
</head>
@bosz
bosz / php-revision.php
Created March 2, 2021 13:24
Revising php (Interace, &, Abstract, Traits and Facade
<?php
/**
* Interface (check)
* Abstract (check)
* Trait (check)
* & (check)
* Facade (check)
*/