Skip to content

Instantly share code, notes, and snippets.

View mdsohelmia's full-sized avatar
🎯
Focusing

Sohel Mia mdsohelmia

🎯
Focusing
View GitHub Profile

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@mdsohelmia
mdsohelmia / CountriesTableSeeder.php
Created September 14, 2019 19:40 — forked from SumonMSelim/CountriesTableSeeder.php
Countries Table Seeder for Laravel
<?php
use App\Country;
use Illuminate\Database\Seeder;
class CountriesTableSeeder extends Seeder
{
public function run()
{
$countries = [
@mdsohelmia
mdsohelmia / auth.php
Created September 15, 2019 07:39 — forked from mabasic/auth.php
`config/auth.php` for JWT Authentication in Lumen
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
@mdsohelmia
mdsohelmia / compat_l5.php
Created September 15, 2019 08:56 — forked from vluzrmos/compat_l5.php
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
<?php
if(!function_exists('config_path'))
{
/**
* Return the path to config files
* @param null $path
* @return string
*/
function config_path($path=null)
@mdsohelmia
mdsohelmia / compat_l5.php
Created September 15, 2019 08:56 — forked from vluzrmos/compat_l5.php
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
<?php
if(!function_exists('config_path'))
{
/**
* Return the path to config files
* @param null $path
* @return string
*/
function config_path($path=null)
@mdsohelmia
mdsohelmia / url.md
Created September 15, 2019 14:22 — forked from sohelamin/url.md
Restful URL
@mdsohelmia
mdsohelmia / eloquent-cheatsheet.php
Created September 18, 2019 19:01 — forked from hasinhayder/eloquent-cheatsheet.php
Laravel 5 Eloquent CheatSheet #laravel #eloquent
Model::
/*Select*/
select('col1','col2')
->select(array('col1','col2'))
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating'))
->addSelect('col3','col4')
->distinct() // distinct select
/*From*/
@mdsohelmia
mdsohelmia / List.md
Created December 29, 2019 16:20 — 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):

@mdsohelmia
mdsohelmia / List.md
Created December 29, 2019 16:20 — 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):

@mdsohelmia
mdsohelmia / List.md
Created December 29, 2019 16:20 — 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):