Skip to content

Instantly share code, notes, and snippets.

View hemantachhami19's full-sized avatar

Hemant Achhami hemantachhami19

  • Solteemode,kathmandu
View GitHub Profile

Laravel alternatives in NodeJS

These are alternative packages/frameworks in NodeJS that cover some of the primary features in Laravel. This is by no means a comprehensive list of Laravel features (or a comprehensive list of NodeJS alternatives).

Depending on your perspective, this list either shows how it's possible to switch from Laravel to NodeJS or shows why you'd want to stay with Laravel 😃


Full stack framework alternatives: Nest, Adonis

select distinct t1.*
from payments t1
join payments t2
on t2.created_at between (t1.created_at - interval '10 second')
and (t1.created_at + interval '10 second')
and t2.id != t1.id
order by id
-- Updating multiples ids at once
-- 1st approach
UPDATE employees
SET address = (case
when id = 1 then 'address1'
when id = 2 then 'address2'
when id = 3 then 'address3'
end)
WHERE id in (1, 2, 3);
@hemantachhami19
hemantachhami19 / outputCSV.php
Created May 14, 2020 15:50 — forked from paligiannis/outputCSV.php
Laravel Chunk Results to CSV
<?php
/*
* Chunk through result set and output as CSV file in browser.
*/
function outputCSV($columns, $query, $chunkSize = 200) {
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename='export-" . date("YmdHis") . ".csv");
header("Pragma: no-cache");
header("Expires: 0");
@hemantachhami19
hemantachhami19 / List.md
Created December 24, 2018 15:31 — 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):