Skip to content

Instantly share code, notes, and snippets.

View ahmetbedir's full-sized avatar
🎯
Focusing

Ahmet Bedir ahmetbedir

🎯
Focusing
View GitHub Profile
@rappasoft
rappasoft / laravel-livewire-tables-demo-table.php
Last active May 24, 2025 03:35
Laravel Livewire Tables Demo Table Source
<?php
namespace App\Http\Livewire;
use App\Models\Tag;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Columns\BooleanColumn;
use Rappasoft\LaravelLivewireTables\Views\Column;
@fer-ri
fer-ri / laravel.js
Last active October 18, 2021 12:45 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Taken from: https://gist.github.com/soufianeEL/3f8483f0f3dc9e3ec5d9
Modified by Ferri Sutanto
- use promise for verifyConfirm
Examples :
<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?">
@irazasyed
irazasyed / amung_stats.php
Created April 14, 2013 12:31
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();