What version of wamp ae you using?

|
DesolatorMagno 2019-06-26 17:03:28
https://stackoverflow.com/questions/25575217/laravel-array-merge-argument-2-is-not-an-array-error/25575218
Did you tried Google Search before? read this, it may help you.

Laravel: array_merge(): Argument #2 is not an array errorStack Overflow
Exceptions started to appear in all views, and when I try to run composer update, it always ends up with

{“error”:{“type”:”ErrorException”,”message”:”array_merge(): Argument #2 is not an array”,”f…

skys215 2019-06-26 17:03:50
ALIREZAJOM 2019-06-26 17:01:32
I did not use this function

even on blade?

ALIREZAJOM 2019-06-26 17:04:08
:
ALIREZAJOM 2019-06-26 17:04:28
@foreach($users as $userItem)
@include(‘admin.user.items’,$userItem)
@endforeach
ALIREZAJOM 2019-06-26 17:04:35
admin.user.items:
ALIREZAJOM 2019-06-26 17:05:03
<td>{{$userItem->id}}</td>
<td>{{$userItem->fullName}}</td>
ALIREZAJOM 2019-06-26 17:05:29
That’s it
skys215 2019-06-26 17:06:08
I can’t guess where is the error, sorry
DesolatorMagno 2019-06-26 17:07:42
DesolatorMagno 2019-06-26 17:03:28
https://stackoverflow.com/questions/25575217/laravel-array-merge-argument-2-is-not-an-array-error/25575218
Did you tried Google Search before? read this, it may help you.

Read these, maybe it cna help you.

ALIREZAJOM 2019-06-26 17:20:47
[2019-06-26 14:18:14] local.ERROR: array_merge(): Argument #2 is not an array (View: D:ServerwwwBlogresourcesviewsadminuserindex.blade.php) {“exception”:”[object] (ErrorException(code: 0): array_merge(): Argument #2 is not an array (View: D:\Server\www\Blog
esources\views\admin\user\index.blade.php) at D:\Server\www\Blog\vendor\laravel\framework\src\Illuminate\View\Factory.php:137, ErrorException(code: 0): array_merge(): Argument #2 is not an array at D:\Server\www\Blog\vendor\laravel\framework\src\Illuminate\View\Factory.php:137)
danialld 2019-06-26 17:24:04
ALIREZAJOM 2019-06-26 17:04:28
@foreach($users as $userItem)
@include(‘admin.user.items’,$userItem)
@endforeach

@foreach($users as $userItem)
@include(‘admin.user.items’, compact(‘userItem’))
@endforeach

* use foreach in include

ALIREZAJOM 2019-06-26 17:25:44
danialld 2019-06-26 17:24:04
@foreach($users as $userItem)
@include(‘admin.user.items’, compact(‘userItem’))
@endforeach

* use foreach in include

Can be an example

ALIREZAJOM 2019-06-26 17:25:57
danialld 2019-06-26 17:24:04
@foreach($users as $userItem)
@include(‘admin.user.items’, compact(‘userItem’))
@endforeach

* use foreach in include

How’re you?

DesolatorMagno 2019-06-26 17:27:01
danialld 2019-06-26 17:24:04
@foreach($users as $userItem)
@include(‘admin.user.items’, compact(‘userItem’))
@endforeach

* use foreach in include

@each(‘view.name’, $jobs, ‘job’)

I like using each in those cases.

DesolatorMagno 2019-06-26 17:27:21
laravel_discuss-7813.jpg

danialld 2019-06-26 17:28:37
DesolatorMagno 2019-06-26 17:27:01
@each(‘view.name’, $jobs, ‘job’)

I like using each in those cases.

Seems includeing a file for each loop
I think It might be a bad practice

DesolatorMagno 2019-06-26 17:30:01
You can have a view that is for each item, examples are found in the ofitial documentation (i just changed the theme because is to light for me)
DesolatorMagno 2019-06-26 17:30:26
https://laravel.com/docs/5.8/blade#including-sub-views

Laravel – The PHP Framework For Web ArtisansLaravel
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
danialld 2019-06-26 17:30:40
DesolatorMagno 2019-06-26 17:30:26
https://laravel.com/docs/5.8/blade#including-sub-views

i had seen it …

DesolatorMagno 2019-06-26 17:31:34
Ok, so? why is it a bad practice, or why It might be a bad practice
danialld 2019-06-26 17:33:48
DesolatorMagno 2019-06-26 17:31:34
Ok, so? why is it a bad practice, or why It might be a bad practice

I do like this: (includ was called once)
vidoes:
@foreach($videos as $video)
<article>

</article>
@endforeach

@include(‘videos’)

DesolatorMagno 2019-06-26 17:34:46
I did that before, but now i like to have it in diferent files, less code in each place and i just see what i need to see, i can reuse code and change certain aspect easily.
danialld 2019-06-26 17:35:32
DesolatorMagno 2019-06-26 17:34:46
I did that before, but now i like to have it in diferent files, less code in each place and i just see what i need to see, i can reuse code and change certain aspect easily.

Sure , but im talking about performance

DesolatorMagno 2019-06-26 17:36:01
I have to build a semi Social network, and reusing post, user list, etc, was really necesary.
DesolatorMagno 2019-06-26 17:39:56
danialld 2019-06-26 17:35:32
Sure , but im talking about performance

Yes, i understand, it sound like it would be slower including a file for each iteration, it seem the natural thing, but without test i can’t be sure, i used to believe that “” was much more expensive that ”, but that thing is now in the past, concatenating 2+ var using the dot is slower that plainly wrapping it around “” (i have seem a coupple of test about it).

ALIREZAJOM 2019-06-26 17:48:35
thanks to everyone
ALIREZAJOM 2019-06-26 17:48:56
Exactly the problem of
ALIREZAJOM 2019-06-26 17:49:57
send param to admin.user.items
danialld 2019-06-26 17:53:42
I had answer it !
Marvixino 2019-06-26 20:27:09
Do you what this error mean:
include(/app): failed to open stream: No error information
senhorY 2019-06-26 20:38:23
Marvixino 2019-06-26 20:27:09
Do you what this error mean:
include(/app): failed to open stream: No error information

senhorY 2019-06-26 20:39:12
Try with quotes
Marvixino 2019-06-26 20:40:12
this the error!
Marvixino 2019-06-26 20:40:37
laravel_discuss-7838.jpg

Marvixino 2019-06-26 20:44:43
Marvixino 2019-06-26 20:40:37

from the logs:
failed to open stream: No error information {“exception”:”[object] (ErrorException(code: 0): include(/app): failed to open stream: No error information at /app/vendor/composer/ClassLoader.php:444)

Marvixino 2019-06-26 21:32:58
Marvixino 2019-06-26 20:44:43
from the logs:
failed to open stream: No error information {“exception”:”[object] (ErrorException(code: 0): include(/app): failed to open stream: No error information at /app/vendor/composer/ClassLoader.php:444)

solved with composer update

Nomiilk 2019-06-26 23:52:41
please i cant upgrade my php version, i see version 7.1.9 in wamp but when i put in command line its 5.6 i see
Nomiilk 2019-06-26 23:52:47
how can i upgrade it ?
joseph_ayuk 2019-06-26 23:58:46
have tried selecting the version in wamp
Nomiilk 2019-06-27 00:00:06
Yes
joseph_ayuk 2019-06-27 00:22:02
what version of wamp ae you using ?
Nomiilk 2019-06-27 00:35:54
3.5
Nomiilk 2019-06-27 00:36:04
i’ve turned on xampp now
joseph_ayuk 2019-06-27 01:02:48
ok
ALIREZAJOM 2019-06-27 07:31:18
sallam
ALIREZAJOM 2019-06-27 07:31:24
in_array() expects parameter 2 to be array, integer given
nasservb 2019-06-27 09:00:34
ALIREZAJOM 2019-06-27 07:31:24
in_array() expects parameter 2 to be array, integer given

Second parameter must be an array . You pass integer

Nomiilk 2019-06-27 09:20:52
Please i have a problem.
Nomiilk 2019-06-27 09:21:29
When i open localhost:8000 the say whoops, like something went wrong.
Nomiilk 2019-06-27 09:21:41
The server is started.
|