I am a Laravel newbie. I'm following a tutorial where someone sets up a custom library to verify forms. My directory structure is setup like this:
Lara
----->app----->Acme----->Services
----->Validators
----->bootstrap
----->public
----->vendor
I get an error: ReflectionException Class Acme\Services\TasksValidator does not exist
I suspect it's in my TaskController which starts like this:
<?php
use \Acme\Services\TaskCreatorService;
class TasksController extends BaseController{
protected $taskCreator;
public function __construct(TaskCreatorService $taskCreator){
$this->taskCreator = $taskCreator;
}
public function index(){
$tasks = Task::with('user')->get();
$users = User::lists('username', 'id');
What am I doing wrong? I've added the following in my composer.json under autoload
"psr-0":{
"Acme":"app/"
}
I've also run: composer dump-autoload -o
My TaskCreatorService file begins like this:
<?php
namespace Acme\Services;
use Acme\Validators\TaskValidator;
use Acme\Validators\ValidationException;
use Task;
class TaskCreatorService{
protected $validator;