質問編集履歴

4

修正

2017/07/30 15:39

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  @if($users)
16
16
 
17
- @foreach($users-> as $user)
17
+ @foreach($users as $user)
18
18
 
19
19
  <p>{{ $user->employee_job_offers->job_id }}</p>
20
20
 

3

追加Controller

2017/07/30 15:39

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -301,3 +301,25 @@
301
301
 
302
302
 
303
303
  ```
304
+
305
+ UserController:
306
+
307
+ ```
308
+
309
+ public function index()
310
+
311
+ {
312
+
313
+ $employee_profiles = Employee_profiles::all();
314
+
315
+ $employee = Employee::all();
316
+
317
+ $job_offers = Employee_job_offers::all();
318
+
319
+ return view('home',compact('employee_profiles','employee','job_offers'));
320
+
321
+
322
+
323
+ }
324
+
325
+ ```

2

追加説明

2017/07/30 15:33

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -32,7 +32,7 @@
32
32
 
33
33
  ```
34
34
 
35
- Property [job_id] does not exist on this collection instance. (View: /vagrant/test/resources/views/home.blade.php)
35
+ Trying to get property of non-object (View: /vagrant/test/resources/views/home.blade.php)
36
36
 
37
37
  ```
38
38
 

1

説明追加

2017/07/30 14:36

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -28,6 +28,14 @@
28
28
 
29
29
 
30
30
 
31
+ error:
32
+
33
+ ```
34
+
35
+ Property [job_id] does not exist on this collection instance. (View: /vagrant/test/resources/views/home.blade.php)
36
+
37
+ ```
38
+
31
39
  説明:
32
40
 
33
41
  データベース一つ: