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.blade.php
Created June 21, 2020 05:01 — forked from tanthammar/session-timeout-alert-after-livewire-scripts.blade.php
Laravel Livewire Turbolinks Blade component to keep session alive
//in the head
<x-session-timeout-alert-head :permanent="false" />
</head>
//after livewire scripts
@livewireScripts
<x-session-timeout-alert-after-livewire-scripts />
</body>
@ManojKiranA
ManojKiranA / AppServiceProvider.php
Created June 16, 2020 12:51 — forked from JeffreyWay/AppServiceProvider.php
Laracasts Widgets Lesson
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
<?php
$spaces = [
'driver' => 's3',
'key' => env('DO_SPACES_KEY'),
'secret' => env('DO_SPACES_SECRET'),
'endpoint' => env('DO_SPACES_ENDPOINT'),
'region' => env('DO_SPACES_REGION'),
'bucket' => env('DO_SPACES_BUCKET')
];
<?php
namespace App\Charts;
use App\Support\Livewire\ChartComponentData;
use ConsoleTVs\Charts\Classes\Chartjs\Chart;
/**
* Class WanSpeedTestsChart
*
@ManojKiranA
ManojKiranA / alpine-todo.html
Created May 18, 2020 11:40 — forked from kez/alpine-todo.html
Alpine.js Todo App Demo (with Tailwind). Please feel free to fork and refactor with improvements! Motivation/details here https://www.kdobson.net/2020/alpine-js-todo-demo/)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Alpine.js Todo Demo</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.js" defer></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css">
<meta charset="utf-8">
</head>
@ManojKiranA
ManojKiranA / LimitNumberOfItemsRule.php
Last active December 3, 2020 10:35
Laravel Validation Rules for limiting the minimum and maximum number of fileds in given array
<?php
namespace App\Rules;
use Illuminate\Support\Str;
use Illuminate\Contracts\Validation\Rule;
class LimitNumberOfItemsRule implements Rule
{
/** @var array */
@ManojKiranA
ManojKiranA / HasFilters.php
Created February 6, 2020 00:13 — forked from nkeena/HasFilters.php
A simple trait that provides robust filtering by a model's attributes
<?php
namespace App\Traits;
use Illuminate\Support\Str;
trait HasFilters
{
public function scopeFilter($query, $filters = [])
{
@ManojKiranA
ManojKiranA / SingletonModel.php
Created January 25, 2020 02:04 — forked from mpociot/SingletonModel.php
Making it easier to work with single row models in Laravel
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class SingletonModel extends Model
{
protected function store($data = [])
{
@ManojKiranA
ManojKiranA / Links.vue
Created December 19, 2019 09:14
Inertia Js