Maybe this is happening because you're using slash instead of backslash, so it should be use Curl\Curl; (assuming you installed the Curl library correctly on Composer).
Nov 21, 2016
6
Level 1
Adding custom class with "use" of laravel class
Hi,
I have added a new class to app\custom folder called Test;
The class looks like this:
namespace App\Custom;
use Curl\Curl;
class Test
{
}
The class will use Curl library.
Now when i call the class from controller, i get error "Class 'App\Curl' not found".
How to solve this, so i can use this curl class inside custom class of mine?
Level 1
Solved... The curl class just wasn't downloaded by composer. I had to require it.
Never code at night.
Please or to participate in this conversation.