Skip to content

Instantly share code, notes, and snippets.

View RabibHossain's full-sized avatar
🏆
Focusing

S.M. Rabib Hossain Galib RabibHossain

🏆
Focusing
View GitHub Profile
#!/bin/bash
set -e
# === CONFIG ===
CONTAINER_NAME="mysql_container"
IMAGE_NAME="mysql"
MYSQL_TAG="8.0.36" # optionally auto-detect
ROOT_PASSWORD="12345678"
VOLUME_PATH="/home/rabib/docker-volume/mysql-vlyby"
DUMP_PATH="/home/rabib/Downloads/dump-drive/dump.sql"
// Sample data-url image. Please copy the data & paste in the web url
// You'll have file via validator or request method
$image = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAAAfSURBVDhPY/j+v49sNKqZRDSqmUQ0qplENPI0/+8DAOnW7m6FxOUUAAAAAElFTkSuQmCC";
// You can use either Step 1 or Step 2 code block
### Step 1 ###
$data = explode( ',', $image );
$image_name = time() . '.' . 'jpeg';
@extends('main')
@section('content')
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<section class="col-md-12">
<div class="card">
<div class="card-body">
/**
* Add below code after namespace.
*
* use Spatie\Permission\Exceptions\UnauthorizedException;
*/
public function render($request, Throwable $e)
{
if ($e instanceof UnauthorizedException) {
Route::group(['middleware' => ['permission:ticket-list']], function () {
Route::get('/consumers/{ticket}', [ConsumerController::class, 'ticket'])->name('consumer.ticket');
});
@RabibHossain
RabibHossain / EloquentCheatSheet.md
Created June 27, 2020 22:15 — forked from avataru/EloquentCheatSheet.md
Eloquent relationships cheat sheet