Skip to content

Instantly share code, notes, and snippets.

View MatinMN's full-sized avatar
🎯
Focusing

Matin Mazloom Nezhad MatinMN

🎯
Focusing
  • Kuala Lumpur, Malaysia
View GitHub Profile
@MatinMN
MatinMN / CommentResource.php
Created September 28, 2023 01:36
Polymorphic relationship in Filament example 1-1 , 1-m
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\CommentResource\Pages;
use App\Filament\Resources\CommentResource\RelationManagers;
use App\Filament\Resources\PostResource\RelationManagers\CommentsRelationManager;
use App\Models\Comment;
use App\Models\Post;
use App\Models\User;
@MatinMN
MatinMN / Laravel Alpine JS Modal
Last active June 5, 2024 10:36
Laravel Modal Component
// open modal from livewire component
$this->dispatch('open-modal', name: 'user-details');
// close modal
$this->dispatch('close-modal');
#include <iostream>
class Log{
public:
const int LogLevelError = 0;
const int LogLevelWarning = 1;
const int LogLevelInfo = 2;
private:
int LogLevel = LogLevelInfo;
public: