M
M
McFkr2019-02-12 16:14:35
Silex
McFkr, 2019-02-12 16:14:35

How to access the request field?

I execute a request

$result = \Tablename::find_by_name($request->get('name'));

The request is successful. I can access fields, everything except name
print($result->name);
Throws out with an error that there is no name field.
How to access this field?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
McFkr, 2019-02-13
@McFkr

Issue resolved. The problem was that PHP couldn't determine the class of the result object.

A
Anton, 2019-02-12
@Eridani

$resu sl
- $result error in the last two characters

Z
zenaku, 2019-02-12
@zenaku

Did you check the eyeballs?

D
Dmitry, 2019-02-12
@php10

1) If it is private or protected, then nothing.
2) $result or $resusl?
3) Or maybe in your $result array?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question