Skip to content

Instantly share code, notes, and snippets.

View ManojKiranA's full-sized avatar
🔍
Focusing

Manoj Kiran ManojKiranA

🔍
Focusing
  • Postiefs Technologies Private Limited
  • Coimbatore
View GitHub Profile
@ManojKiranA
ManojKiranA / app.css
Created July 26, 2023 06:07 — forked from awcodes/app.css
Filament v3 Custom Login
.fi-simple-main-ctn::before {
content: '';
position: absolute;
inset: 0;
opacity: 0.90;
background-image: radial-gradient(
circle at top,
theme('colors.primary.300'),
theme('colors.transparent'),
theme('colors.transparent') 100%
<?php
namespace App\Forms\Components;
use Closure;
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Components\Field;
class DropInAction extends Field
{
@ManojKiranA
ManojKiranA / BlockSettings.php
Created November 14, 2022 04:56 — forked from awcodes/BlockSettings.php
Filament Block Settings
<?php
namespace App\Forms\Components;
use Filament\Forms\Components\Group;
class BlockSettings extends Group
{
protected string $view = 'filament.forms.components.block-settings';
@ManojKiranA
ManojKiranA / FilamentCardTableLayout.php
Created November 10, 2022 19:54 — forked from AAbosham/FilamentCardTableLayout.php
Filament Card Table Layout
<?php
namespace App\Filament\Resources\Trip;
//...
class PlaceResource extends Resource
{
public static function table(Table $table): Table
{
return $table
@ManojKiranA
ManojKiranA / DoughnutChart.php
Last active September 29, 2022 08:27
Doughnut Chart Implementation in Filament Admin Panel
<?php
namespace App\Filament\Widgets;
use Carbon\CarbonPeriod;
use Filament\Widgets\DoughnutChartWidget;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
class DoughnutChart extends DoughnutChartWidget
@ManojKiranA
ManojKiranA / website.backup.sh
Created July 11, 2022 05:00 — forked from andrewjcurrie/website.backup.sh
Website Backup Shell Script
#!/bin/bash
#
# Website Backup Shell Script
# by Andrew Currie (andrew@digitalpci.com)
#
# Performs a full backup of the specified database and document root.
# Be sure to edit the configuration options at the beginning of the file to match your environment prior to executing.
# The end result will be one TAR archive with the name 'website-backup-(current-datestamp)'.
# The backup includes the entire document root directory and also a 'database.sql' file containing a MySQL dump of the database.
#
@ManojKiranA
ManojKiranA / child-filepath.md
Created June 17, 2022 15:06 — forked from joemaller/child-filepath.md
Get PHP child Class file paths from inherited parent class methods

Get PHP child Class file paths from inherited parent class methods

While refactoring some code into a reusable PHP Class I hit a brief roadblock where some code expected the [__FILE__ magic constant][file] file path. Since that value always refers to the specific file it's called from, it won't work from a separate Class file because the referenced path would be the parent instead of the child.

The full filepath of a child Class can be inferred from an inherited parent Class method by combining [get_class($this)][get_class] or [get_called_class()][get_called_class] with the [ReflectionClass::getFileName][getfilename] method like this:

// ParentClass.php
class ParentClass
{
@ManojKiranA
ManojKiranA / MatrimonialReligionAndCaste.json
Created June 3, 2022 10:55 — forked from Dhaneshmonds/MatrimonialReligionAndCaste.json
Indian Matrimonial Website Religion and Caste json file
{
"religion": [
{
"id": "1",
"name": "Hindu",
"castealias":"Caste",
"castes": [
{
"id": "0",
"name": "-- Select --"
@ManojKiranA
ManojKiranA / Readme.md
Created May 27, 2022 19:17 — forked from pxlrbt/Readme.md
Filament Geocoder

Usage

  • Install Geocoder Laravel: https://geocoder-php.org/docs/
  • Publish config php artisan vendor:publish (Look for Geocoder)
  • Setup your Google Geocoding API-Key in config/geocoder.php