Controllers: plural
- For example:
UsersControllers
Models: singular
- A model representes one item, i.e. a record from a database. So:
User
orUserModel
.
body.home #navigation li.home a, | |
body.events #navigation li.events a, | |
body.news #navigation li.news a, | |
body.wrestlers #navigation li.wrestlers a, | |
body.shop #navigation li.shop a { | |
background: #ff9900; | |
} |
<?php | |
$file_to_upload = array( | |
'ticket_attachment[attachment]' => '@' . $_SERVER['DOCUMENT_ROOT'] . '/nmsworkbacklog/crown.jpg', | |
'ticket_attachment[description]' => 'test description' | |
); | |
$headers = array(); | |
$headers[] = 'Authorization: Basic ' . base64_encode('nms/martinbean:' . $this->registry->get('authenticate')->getApiKey()); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'http://api3.codebasehq.com/api-test-project/tickets/146/attachments'); | |
curl_setopt($ch, CURLOPT_POST, true); |
<?php | |
$products = array( | |
array( | |
'title' => 'Product #1', | |
'description' => 'Lorem ipsum' | |
), | |
array( | |
'title' => 'Product #2', | |
'description' => 'Lorem ipsum' |
{ | |
"require": { | |
"aws/aws-php-sdk": "dev-master" | |
} | |
} |
<?php | |
class NewsArticle extends AppModel { | |
public $name = 'NewsArticle'; | |
public $hasAndBelongsToMany = array( | |
'Image' => array( | |
'joinTable' => 'news_articles_images' | |
) | |
); | |
<?php | |
// whitelist columns to filter by | |
$filterable = array( | |
'colour', | |
'size', | |
'price' | |
); | |
// build up string for WHERE clause | |
$where = array(); |
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\GeneratorCommand; | |
class RepositoryMakeCommand extends GeneratorCommand | |
{ | |
/** | |
* The console command name. |
#!/bin/sh | |
cd 'project-dir' | |
composer install | |
php artisan migrate | |
php artisan db:seed | |
npm install --loglevel error | |
export DISABLE_NOTIFIER=true | |
gulp |
key.replace(/\.(\w+)/g, '[$1]'); |