1// If the "add answer" button isn't showing:
2// Simply press "a" on your keyboard after searching your question! :)
1cakephp3
2
3
4find($id) takes an id and returns a single model. If no matching model exist, it returns null.
5
6findOrFail($id) takes an id and returns a single model. If no matching model exist, it throws an error1.
7
8first() returns the first record found in the database. If no matching model exist, it returns null.
9
10firstOrFail() returns the first record found in the database. If no matching model exist, it throws an error1.
11
12get() returns a collection of models matching the query.
13
14pluck($column) returns a collection of just the values in the given column. In previous versions of Laravel this method was called lists.
15
16toArray() converts the model/collection into a simple PHP array.
1ng if cart icon got items only show numbers
2
3<ion-icon slot="end" (click)="openCart()" #cart class="cart_icons" name="cart-outline"></ion-icon>
4 <div *ngIf="(cartItemCount | async) >= 1 ">
5 <span>{{ cartItemCount | async }}</span>
6 </div>
7 </div>