I have a controller that is located at:
app/Http/Controllers/Auth/LoginController
that has the login function.
I created a route in my api.php for when login hit my method access:
Route::post('login', 'Auth\LoginController@login');
My login controller:
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
...
I get:
Class 'App \ Http \ Controllers \ Auth \ Auth' not found "
If I change the route and just leave:
Route::post('login', 'LoginController@login');
I get:
"Class App \ Http \ Controllers \ LoginController does not exist"
I would like to know how to fix this and why laravel is so bad with the location of the files?