1

I have created a controller using:

php artisan make:controller VideoCategoryController --resource

Here is the route:

Route::resource('/admin/video/category', 'VideoCategoryController');

The index() doesn't return data, but other methods work properly.

public function index()
{ 
    return 'test'; 
}
1
  • Show us how you are accessing the route Commented May 8, 2020 at 19:21

2 Answers 2

0

Is this solved? Are you trying to return it to the view?

public function index() { 
return view('test');
}
Sign up to request clarification or add additional context in comments.

Comments

-1

The function name should be:

getIndex() instead of index().

Please refer: https://laravel.com/docs/5.1/controllers#implicit-controllers

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.