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
{
"ab":{
"name":"Abkhaz",
"nativeName":"аҧсуа"
},
"aa":{
"name":"Afar",
"nativeName":"Afaraf"
},
"af":{
@ManojKiranA
ManojKiranA / download_csv.php
Created November 30, 2021 04:39 — forked from mpijierro/download_csv.php
Example streaming large CSV files with Laravel and thousands of queries
<?php
namespace Src\Csv;
use Illuminate\Http\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
/**
* Class DownloadLargeCsv
*
@ManojKiranA
ManojKiranA / explain.md
Created March 3, 2021 15:40
Livewire - React to Server Side Events

Reacting to server side Laravel events (no websockets)

I used a custom directive to implement this, but essentially:

<div wire:new-like="loadLikes">
  
</div>
@ManojKiranA
ManojKiranA / .gitignore
Created February 12, 2021 11:16 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@ManojKiranA
ManojKiranA / List.md
Created December 17, 2020 12:09 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@ManojKiranA
ManojKiranA / opendb.sh
Created September 18, 2020 12:26 — forked from AlexVanderbist/opendb.sh
`opendb` command - opens the database for a Laravel app in your GUI
opendb () {
[ ! -f .env ] && { echo "No .env file found."; exit 1; }
DB_CONNECTION=$(grep DB_CONNECTION .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
DB_HOST=$(grep DB_HOST .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
DB_PORT=$(grep DB_PORT .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
DB_DATABASE=$(grep DB_DATABASE .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
DB_USERNAME=$(grep DB_USERNAME .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
DB_PASSWORD=$(grep DB_PASSWORD .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
@ManojKiranA
ManojKiranA / macros.php
Created July 30, 2020 04:28
Laravel Macros
<?php
use Illuminate\Support\Str;
use App\Libraries\RDStationApi;
use Illuminate\Support\Debug\Dumper;
Form::macro('dateField', function ($name, $label = NULL, $value = NULL, $attributes = []) {
$element = '<div class="datepicker-input input-group date">';
$element .= Form::text($name, $value ? $value : old($name), field_attributes($name, array_merge($attributes, ['data-input' => 'date'])));
$element .= '<span class="input-group-addon">';
<?php
namespace App\Traits;
use Illuminate\Database\Eloquent\Builder;
trait HasStatus
{
public static function bootHasStatus()
{
$status_column = (new static)->getStatusColumnName();
<?php
namespace App\Traits;
trait FullTextSearch
{
/**
* Replaces spaces with full text search wildcards
*
* @param string $term