Skip to content

Instantly share code, notes, and snippets.

View hoodasaad's full-sized avatar

Mahmoud Saad hoodasaad

View GitHub Profile
@hoodasaad
hoodasaad / List.md
Created January 2, 2020 11:52 — 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):

@hoodasaad
hoodasaad / Mysql -> Count From Big Table.txt
Last active June 11, 2018 21:27
Mysql -> Count From Big Table
SELECT `AUTO_INCREMENT` as 'count' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'mahmouda_million' AND TABLE_NAME = 'member'
@hoodasaad
hoodasaad / best
Last active April 28, 2018 11:06
Sql to Generate Random unique number
SELECT uuid() AS 'rvkey' FROM `{$prefix}visit` WHERE 'rvkey' NOT IN (SELECT `vkey` FROM `{$prefix}visit`) LIMIT 1
@hoodasaad
hoodasaad / Laravel Multiple Counts with multiple joins
Created April 1, 2018 21:59
Laravel Select Multiple Counts with multiple joins >> without leftJoin , GoupBy
$prefix = Config::get('database.connections.mysql.prefix');
$posts = App\Post::select(
'post.title'
,'post.pskey'
,'post.phone'
,'post.show_map'
,'post.publish_at'
,'city.city'
,'city_alias.alias as city_alias'
,'post_alias.alias'
@hoodasaad
hoodasaad / Cron Run Php File without link
Last active July 28, 2017 15:56
Cron Run Php File without link
var $_GET = {};
document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () {
function decode(s) {
return decodeURIComponent(s.split("+").join(" "));
}
$_GET[decode(arguments[1])] = decode(arguments[2]);
});