0

how can we call controller method from console kernel.php in laravel. I am going to schedule one cron to so in schedule method I have write some code and going to call controller method. When I am going to call it and run the command sudo php artisan schedule:run It gives me error like

[ReflectionException] Class App\Http\Controllers\Auth\ReservationController does not exist

3
  • I know there are some questions related to this is already there. But they didn't help me. Commented Sep 16, 2019 at 11:16
  • Is the namespace correct? App\Http\Controllers\Auth\ReservationController. Usually Laravel controller are at App\ControllersReservationController. Commented Sep 16, 2019 at 11:18
  • Ohhh.. I forgot to remove Auth from the path. Thanks a lot @MuhammadTashfeen. You saved my time. Commented Sep 16, 2019 at 11:21

1 Answer 1

1

Check your namespace. It should be App\Http\Controllers\ReservationController.

Sign up to request clarification or add additional context in comments.

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.