Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
<?php | |
use App\Country; | |
use Illuminate\Database\Seeder; | |
class CountriesTableSeeder extends Seeder | |
{ | |
public function run() | |
{ | |
$countries = [ |
<?php | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Authentication Defaults | |
|-------------------------------------------------------------------------- | |
| | |
| This option controls the default authentication "guard" and password |
<?php | |
if(!function_exists('config_path')) | |
{ | |
/** | |
* Return the path to config files | |
* @param null $path | |
* @return string | |
*/ | |
function config_path($path=null) |
<?php | |
if(!function_exists('config_path')) | |
{ | |
/** | |
* Return the path to config files | |
* @param null $path | |
* @return string | |
*/ | |
function config_path($path=null) |
Reference http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
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*/ |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):