回答編集履歴
2
ヒント追加
test
CHANGED
@@ -7,3 +7,19 @@
|
|
7
7
|
|
8
8
|
|
9
9
|
[Collectionについて](https://readouble.com/laravel/5.1/ja/collections.html)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
Collectionクラスには `isEmpty()` というメソッドがあるので、それを使うとスマートにかけるかもしれません。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
```php
|
18
|
+
|
19
|
+
if ($profile->isEmpty()) {
|
20
|
+
|
21
|
+
//
|
22
|
+
|
23
|
+
}
|
24
|
+
|
25
|
+
```
|
1
リンク表示変更
test
CHANGED
@@ -1,8 +1,4 @@
|
|
1
|
-
確かに`empty()` は空の配列をチェックすることができます。
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
http://php.net/manual/ja/function.empty.php
|
1
|
+
確かに`empty()` は[空の配列をチェックすることができます。](http://php.net/manual/ja/function.empty.php)
|
6
2
|
|
7
3
|
|
8
4
|
|