Skip to content

Instantly share code, notes, and snippets.

View ahmetbedir's full-sized avatar
🎯
Focusing

Ahmet Bedir ahmetbedir

🎯
Focusing
View GitHub Profile
{
"meta": {
"theme": "professional"
},
"basics": {
"name": "Ahmet Bedir",
"label": "Senior PHP & Laravel Developer",
"email": "ahmetbedir16@gmail.com",
"phone": "+90 5444866138",
"url": "https://github.com/ahmetbedir",
@ahmetbedir
ahmetbedir / custom-route-resolver.php
Created January 14, 2025 15:31
Laravel custom route resolver for route paramaters test
<?php
$request = new Request([], [], [], [], [], ['REQUEST_URI' => 'testing/1']);
$request->setRouteResolver(function () use ($request) {
return (new Route('GET', 'testing/{paramater_name}', []))->bind($request);
});
dd($request->route()->parameter('paramater_name'));
@ahmetbedir
ahmetbedir / pint.json
Created August 18, 2024 19:25 — forked from JustSteveKing/pint.json
Laravel Pint configuration
{
"preset": "per",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,
@ahmetbedir
ahmetbedir / HandleInertiaRequests.php
Created July 1, 2024 09:18 — forked from lukaskleinschmidt/HandleInertiaRequests.php
inertia-laravel multiple root views
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Inertia\Middleware;
class HandleInertiaRequests extends Middleware
{
@ahmetbedir
ahmetbedir / resume-old.json
Last active October 31, 2025 20:18
resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Ahmet Bedir",
"label": "Software Developer at Despatch Cloud",
"image": "",
"email": "a_bedir43@hotmail.com",
"phone": "05444866138",
"url": "",
"summary": "",
@ahmetbedir
ahmetbedir / FindRiskyNumericFields.php
Created December 14, 2022 14:35 — forked from ilyasozkurt/FindRiskyNumericFields.php
FindRiskyNumericFields.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class FindRiskyFieldsOnDatabases extends Command
{
/**
@ahmetbedir
ahmetbedir / app.js
Created July 8, 2021 14:19 — forked from nasrulhazim/app.js
Laravel Delete Method using JavaScript
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
@ahmetbedir
ahmetbedir / loadmore.js
Last active April 8, 2021 23:17
JavaScript LoadMore Plugin
"use strict";
class LoadMore {
constructor(action, contentId, buttonId) {
this.action = action;
this.content = document.getElementById(contentId.replace("#", ""));
this.button = document.getElementById(buttonId.replace("#", ""));
this.page = this.button.dataset.page;
this.loading = false;
this.button.addEventListener("click", event => {
@ahmetbedir
ahmetbedir / amung_stats.php
Created April 5, 2021 00:20 — forked from irazasyed/amung_stats.php
PHP: Get whos.amung.us visitors stats
/*-------------------------------------------------+
| Get current visitors count (whos.amung.us)
+-------------------------------------------------*/
function getAmungStats($amung) {
if(!isset($amung)) return false;
$url = 'http://whos.amung.us/sitecount/' . $amung . '/';
$result = '';
if (function_exists('curl_init')) {
$http_headers = array();
@ahmetbedir
ahmetbedir / qrcode.php
Created February 6, 2021 09:24
PHP QR Code Generator
<?php
function qrcode(){
return new class {
private $value;
private $width = 250;
private $height = 250;
public function make()
{