Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
Missing argument 1 for Illuminate\Support\MessageBag::has()

When i access my Laravel Project. It Returns Following Errors. How to Solve It.

Missing argument 1 for Illuminate\Support\MessageBag::has(), called in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Support/ViewErrorBag.php on line 92 and defined (View: /var/www/laravel/resources/views/welcome.blade.php)

In my Blade Code :

  @if ($errors->has())
  <div class="alert alert-danger">
  @foreach ($errors->all() as $error)
    {{ $error }}<br>
  @endforeach
  </div>
  @endif
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Check this line:

@if ($errors->has())

has() is used to filter the selecting model based on a relationship. So it acts very similarly to a normal WHERE condition. If you just use has('relation') that means you only want to get the models that have at least one related model in this relation.

has() must have a string index as its parameter to check whether it exist or not. But in your case it is blank.

Replace the following line:

@if ($errors->has())

with

@if ($errors->count())

and try again.

over 4 years ago · Santiago Trujillo Report

0

Instead of

@if ($errors->has())

Use in Laravel 5.3

@if ($errors->count())
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!