Hope one of you can help me with a problem.
I get an error, telling me i'm not using an array with in_array().
Using pluck() should get me an array, right?
{{ Request::ip() }}
{{ $pug->ipbans->pluck('ip') }}
Output:
127.0.0.1
["127.0.0.1","127.0.0.1"]
Then in Blade:
@if( in_array( Request::ip(), $pug->ipbans->pluck('ip') ) )
<div class="alert alert-danger">
Your IP has been blocked on this page. Changes not allowed.
</div>
@endif
I'm getting the following error:
in_array() expects parameter 2 to be array, object given (View: ...)
So it tells me that $pug->ipbans->pluck('ip') is not an array - but it is, right?