amitshrestha221's avatar

Urgent solution required..

I used pingpong for implementing modules in L 5.1 .. I used laravel-modules of nwidart provider in 5.3 .. after I used laravel-modules, i get error like Class Input not found, and for other classes too.. In ping pong there was a line like: use Pingpong\Modules\Routing\Controller; However i cannot see that in laravel-modules.. Please help me..

0 likes
11 replies
drilon's avatar

Show us some code... We cannot help u without seeing your code..

PS: try this command "composer dump-autoload"

amitshrestha221's avatar

@drilon



<?php namespace Modules\Register\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Validation\Factory;
use Illuminate\Support\Facades\Redirect;
use Input;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
use DB;

use App\User;
use App\UserRoles;
use App\CustomLibrary\General;


 public function store(Request $request)
    {   
        dd(Input::all());
        $this->validate($request,[
                                'email'=>'required',
                                'password'=>'required|min:6',
                                'cpassword'=>'required|same:password',
                                'role'=>'required'
                                ]);


Input class Validate class.. nothing is working..




tomopongrac's avatar

I think that in laravel 5.3 class input is replaced with Request::

try

Request:: all()

amitshrestha221's avatar

@tomi I think thats nt the problem.. because no libraries are working..

in 5.1 when i used ping pong there was a line like..


use Pingpong\Modules\Routing\Controller;


but in 5.3, when i used laravel-modules, i can't find that line..

tomopongrac's avatar

Than i dont know what it is ... maybe there is no support for laravel 5.3

amitshrestha221's avatar

yes I updated, and it installed and all those commands like


php artisan module:make Test 

was working.. its just the error where No any Classes can be imported, may be due to the issue I posted earlier.. like in ping pong in L5.1 there was an extra line in newly created module like:


use Pingpong\Modules\Routing\Controller;


tomopongrac's avatar

Did you do this

I had to install the master branch of laravelcollective and update the minimum requirements for composer and now have installed successfully.

amitshrestha221's avatar

@tomi yes i exactly did that.. and the packaged installed successfully .. modules are also being created, i just can't use any libraries/classes inside the module's controller..

amitshrestha221's avatar
Level 3

There was no facade for Input Class.. I added this in config/app.php


'Input' => Illuminate\Support\Facades\Input::class,

Please or to participate in this conversation.