2
I am doubtful when commenting on the method below:
public function index()
{
$posts = Post::orderBy('created_at', 'desc')->paginate(10);
return view('painel.post.listar', compact('posts'));
}
It would be correct to comment in this way:
/**
* Retorna uma instância de View
*
* @return object
*/
public function index()
{
$posts = Post::orderBy('created_at', 'desc')->paginate(10);
return view('painel.post.listar', compact('posts'));
}
Or would Return be View and in the description instead of "Returns a View instance" would be "Returns an object"?
I can output the class path?
– Fábio Jânio
@Sorry I didn’t understand your question as asssim output?
– novic
Let’s assume that I used the helper view(), I can know which was the class or the namespace called in this process, the intention is if possible to identify where it is.
– Fábio Jânio
Opa, I got "dd(get_class(view('painel.post.listar', Compact('posts'))));"
– Fábio Jânio
@Fabius a
var_dump
would already solve.– novic