Skip to content

Instantly share code, notes, and snippets.

View ArtMin96's full-sized avatar

Arthur Minasyan ArtMin96

  • Yerevan, Armenia
  • 15:19 (UTC +04:00)
  • X @ArtMin96
View GitHub Profile
@afsakar
afsakar / AdminPanelProvider.php
Last active April 26, 2025 20:57
Filter for navigation items in FilamentPHP
<?php
namespace App\Providers\Filament;
use Filament\Panel;
use Filament\View\PanelsRenderHook;
use Illuminate\Support\Facades\Blade;
public function panel(Panel $panel): Panel
{
@JustSteveKing
JustSteveKing / pint.json
Last active April 1, 2025 08:36
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,
@fotrino
fotrino / CreateComment.php
Created September 28, 2021 14:35
@mentions with Alpine.js, Livewire & Tributeq
<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\User;
class CreateComment extends Component
{
public $mentionables;
@glueckpress
glueckpress / browser-width.js
Last active August 11, 2019 14:21 — forked from aarongustafson/watchResize.js
Track browser size in real time, do stuff at certain breakpoints. A JavaScript media query, essentially. Borrowed from @aarongustafson.
// watch browser width on resize
var browser_width = 0;
window.watchResize(function(){
browser_width = window.innerWidth || document.body.offsetWidth;
});
// do stuff after breakpoint
window.watchResize(function(){
var threshold = 400;
if ( browser_width >= threshold ) {
@sunel
sunel / Debug.php
Created January 30, 2015 10:48
PHP Pretty var_dump
<?php
class Debug {
/**
* A collapse icon, using in the dump_var function to allow collapsing
* an array or object
*
* @var string
*/