D
D
DaniilKhanin2016-11-10 14:46:49
Laravel
DaniilKhanin, 2016-11-10 14:46:49

Why can't he see the model? error Class 'Task' not found?

I just started to learn Laravel, according to this guide Link
In the paragraph Create a task Link
there are lines:

$task = new Task;
    $task->name = $request->name;
    $task->save();

But when trying to send data from / to /task , it gives an error
Class 'User' not found ?

before that, step 2, I created the Task model, but for some reason he does not see it,
the guide uses version 5.2, I think that there are some changes in 5.3, help!!
PS also did not find the routes.php file in htt, which is mentioned in this part of the manual
, created routes in routes/web.php

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2016-11-10
@DaniilKhanin

What version of Laravel are you using? With $input = $request->all(); Throws error Call to undefined method Illuminate\Support\Facades\Request::all()

Use:
Or if you have a standard alias:
use Request;

A
Alexander Aksentiev, 2016-11-10
@Sanasol

php artisan make:auth
?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question