Method [validateA] does not exist in Laravel 5.0

AmalJo

enter image description hereim trying to validate a set of fields and i get this error, i tried google,laracast but to no help Here is my controller

<?php 
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Validator;

public function add_banner_submit()
{
     $data= Input::except(array('_token'));
     $rule = array(
                'uname'=>'required',
                'image'=>'image|mimes:jpeg,png,jpg,gif,svg|required',
                'url'=>'required',
              );
    $validator = Validator::make($rule,$data);
    if ($validator->fails()) {

            return view('siteadmin.add_banner');
    } else {
           $inputs=Input::all();
           $entry=array(
                   'uname'=>Input::get('uname'),
                   'image'=>Input::get('image'),
                   'url'=>Input::get('url')
                  );

          Banner::add_banner_submit($entry);
          echo"success";
          return view('siteadmin.add_banner');
     }
}

what could be the issue,? Any help is appreciated

Sohel0415

Change this line-

$validator = Validator::make($rule,$data);

To this-

$validator = Validator::make($data, $rule);

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Laravel - method whereDate does not exist

分類Dev

Method links does not exist in Laravel

分類Dev

Laravel 2 instances of BadMethodCallException: 'int does not exist' and 'method does not exist'

分類Dev

laravel pagination Method links does not exist

分類Dev

Method Paginate Does not exist in laravel 5.5

分類Dev

MVC 5 does a controller exist

分類Dev

X0 does not exist in the directory

分類Dev

With Cookie does not exist on response factory Laravel

分類Dev

Laravel 8. Seeder class does not exist

分類Dev

Create a generic PreparedStatement method to check if value does exist in a Table

分類Dev

Route::controllers - Method [index] does not exist on [App\Http\Controllers

分類Dev

Method Illuminate\Database\Eloquent\Collection::paginate does not exist

分類Dev

RX Objservable - .of() method does not exist from angular 2 beta

分類Dev

Angular 5 to 6 Upgrade: Property 'map' does not exist on type Observable

分類Dev

Migrating Hibernate 3 to 5: relation hibernate_sequence does not exist

分類Dev

Migrating Hibernate 3 to 5: relation hibernate_sequence does not exist

分類Dev

Angular 5 : Property 'then' does not exist on type 'Observable<any>'

分類Dev

ReflectionException Class does not exist happens on git branch switch Laravel

分類Dev

How to fix "Class signed does not exist" error in Laravel 5.7?

分類Dev

Laravel 5.7 Class App\Http\Controllers\Auth\VerificationController does not exist

分類Dev

Using Laravel 5 Method Injection with other Parameters

分類Dev

What does $app['files'] do in Laravel 5

分類Dev

Does there exist a concise regex that has the same effect as (0|1)*(1100|1010|1001|0110|0101|0011)?

分類Dev

py4j.Py4JException: Method splits([]) does not exist

分類Dev

spatie / laravel-translatable shows the default locale when I try to retrieve the translation that does not exist yet

分類Dev

Why does volatile exist?

分類Dev

Why does volatile exist?

分類Dev

Animation getTexture() does not exist?

分類Dev

Class Controller does not exist

Related 関連記事

  1. 1

    Laravel - method whereDate does not exist

  2. 2

    Method links does not exist in Laravel

  3. 3

    Laravel 2 instances of BadMethodCallException: 'int does not exist' and 'method does not exist'

  4. 4

    laravel pagination Method links does not exist

  5. 5

    Method Paginate Does not exist in laravel 5.5

  6. 6

    MVC 5 does a controller exist

  7. 7

    X0 does not exist in the directory

  8. 8

    With Cookie does not exist on response factory Laravel

  9. 9

    Laravel 8. Seeder class does not exist

  10. 10

    Create a generic PreparedStatement method to check if value does exist in a Table

  11. 11

    Route::controllers - Method [index] does not exist on [App\Http\Controllers

  12. 12

    Method Illuminate\Database\Eloquent\Collection::paginate does not exist

  13. 13

    RX Objservable - .of() method does not exist from angular 2 beta

  14. 14

    Angular 5 to 6 Upgrade: Property 'map' does not exist on type Observable

  15. 15

    Migrating Hibernate 3 to 5: relation hibernate_sequence does not exist

  16. 16

    Migrating Hibernate 3 to 5: relation hibernate_sequence does not exist

  17. 17

    Angular 5 : Property 'then' does not exist on type 'Observable<any>'

  18. 18

    ReflectionException Class does not exist happens on git branch switch Laravel

  19. 19

    How to fix "Class signed does not exist" error in Laravel 5.7?

  20. 20

    Laravel 5.7 Class App\Http\Controllers\Auth\VerificationController does not exist

  21. 21

    Using Laravel 5 Method Injection with other Parameters

  22. 22

    What does $app['files'] do in Laravel 5

  23. 23

    Does there exist a concise regex that has the same effect as (0|1)*(1100|1010|1001|0110|0101|0011)?

  24. 24

    py4j.Py4JException: Method splits([]) does not exist

  25. 25

    spatie / laravel-translatable shows the default locale when I try to retrieve the translation that does not exist yet

  26. 26

    Why does volatile exist?

  27. 27

    Why does volatile exist?

  28. 28

    Animation getTexture() does not exist?

  29. 29

    Class Controller does not exist

ホットタグ

アーカイブ