I learned to use Laravel, watching Larcasts and using Docs, I came across a lesson that describes Eloquent, but I was stuck in an error:
at HandleExceptions->fatalExceptionFromError( array( 'type' => '64', 'message' => 'Cannot use Illuminate\Routing\Controller as Controller because the name is already in use' ) )
I am very confused and now copied the above examples for sure, but I still get the error. I am using Laravel 5, so I don’t know if there was any kind of undocumented change or if I am just doing something wrong. I did not find anything related to Google search queries that solve the problem, so I was hoping someone here could help. Here is the error code:
<?php namespace App\Http\Controllers; use Illuminate\Routing\Controller; use App\VarName; class VarController extends Controller { public function Var() { $Variable = VarName::get(); dd($Variable); } }
According to the documentation, this should work, and in the video I watched, it worked. What am I missing?
I tried to remove the Controller class, because it seems that this is causing the already used error, which broke everything, reinstalled and tried to just use the Controller, as it extends the eloquent model, but now its statement:
Exception on line Pluralizer.php 258: call_user_func() expects parameter 1 to be a valid callback, mb_strtolower function not found, or invalid function name
which is beyond my understanding of Laravel’s inner workings, I’m stuck and I don’t understand the problem, according to the documentation, I don’t see anything bad in my code, it seems like such a simple step. all I'm trying to do is retrieve information from a database, what happens?
Thanks in advance for your help!