laravel error 5.2 ReflectionException in Route.php line 286:

0

link

I'll give you this repository in case you want to see the complete files I hope you can help me;)

hello I hope you can help I have a project in which everything works correctly on my local server but when uploading it to a shared server it seems to work fine, I can even log in and see queries in the database but when doing an action like create edit or delete I get this error

ReflectionException in Route.php line 286: Class jireh \ http \ Requests \ VistavehicleFormRequest does not exist seeing in other answers it is usually a comma or some error in syntax but reviewing everything I do not think any error has my file VistavehiculoFormRequest.php :

<?php

namespace jireh\Http\Requests;

use jireh\Http\Requests\Request;

class VistavehiculoFormRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'contacto' => 'required|max:50',
            'tel_contacto' => 'required|max:20',
            'email_contacto' => 'email|max:255',
            'nombre' => 'required|max:100',
            'marca' => 'required|max:45',
            'modelo' => 'required|max:45',
            'linea' => 'required|max:45',
            'tipo' => 'required|max:45',
            'origen' => 'required|max:45',
            'precio' => 'required',
            'puertas' => 'required|max:5',
            'motor' => 'required|max:45',
            'cilindros' => 'required|max:5',
            'combustible' => 'required|max:45',
            'millas' => 'required|max:45',
            'descripcion' => 'max:500',
            'ac' => 'required|max:5',
            'full_equipo' => 'required|max:5',
            'estado' => 'required|max:45'     
        ];
    }
}
    
asked by Otto Szarata 20.11.2018 в 00:21
source

1 answer

1

Did you happen to erase or rename that class at some point? it may be that it is cached with the previous name and does not recognize it, try with:

php artisan cache:clear
composer dumpautoload

If you do not fix it try to check where you are using that form request, it must be an error in that part.

------- EDIT --------

By the way, I just saw your git and I noticed something

use jireh\http\Requests\VistavehiculoFormRequest;
use jireh\Http\Requests\MensajeFormRequest;

I do not know if you notice, but the link is lowercase, I do not know how much that affects (I usually use a tool that does this part automatically) but it should influence, I've used tinker to work with classes and is case sensitive, try to change that h by capital letter and try passing composer dump-autoload.

    
answered by 20.11.2018 / 02:15
source