If you have large JavaScript objects (~10-100MB) you may hit some performance issues. This is because whenever you call db.write, the whole db.data is serialized and written to storage.
<button
type="button"
class="btn btn-primary"
(click)="panels.panel1 = !panels.panel1"
[attr.aria-expanded]="!panels.panel1"
aria-controls="collapseBasic1"
>
Toggle collapse
</button>
<hr />
<div id="collapseBasic1" [collapse]="panels.panel1">
<div class="well well-lg card card-block card-header">Some content</div>
</div>
<button
type="button"
class="btn btn-primary"
(click)="panels.panel2 = !panels.panel2"
[attr.aria-expanded]="!panels.panel2"
aria-controls="collapseBasic1"
>
Toggle collapse
</button>
<hr />
<div id="collapseBasic1" [collapse]="panels.panel2">
<div class="well well-lg card card-block card-header">Some content</div>
</div>
// panels.component.ts
export class PanelsComponent {
public panels: { [panelName: string]: boolean } = {
panel1: false,
panel2: false
}
}
public-static-field
protected-static-field
private-static-field
public-instance-field
protected-instance-field
private-instance-field
constructor
public-static-method
protected-static-method
private-static-method
public-instance-method
protected-instance-method
private-instance-method
file_get_contents('http://example.com');
$org = OrgModel::all();
foreach ($org as $item) {
$item->user();
}
$org = OrgModel::with('user')->all();
foreach ($org as $item) {
var_dump($item->user);
}
$app = new Illuminate\Container\Container();
$app->bind('app', $app);
$app->instance('log', $log);
$app->bind('MongoLog', 'log');
class A extends SplObjectStorage
{
protected $log;
public function __construct(MongoLog $log)
{
$this->log = $log;
}
}
class B extends A {}
class C extends A {}
$a = $app->make('A');
$b = $app->make('B');
$c = $app->make('C');
public function save(array $options = array()) {
return parent::save($options);
}