Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.22 KB | None | 0 0
  1. Fatal error: Uncaught Error: Class 'TaskController' not found in /Users/xyz/var/www/html/crud/index.php:7 Stack trace: #0 {main} thrown in /Users/xyz/var/www/html/crud/index.php on line 7
  2.  
  3. /index.php
  4.  
  5. <?php
  6. require dirname(__DIR__).'/vendor/autoload.php';
  7. use App\http\Controllers\TaskController;
  8.  
  9. new TaskController();
  10. _____________________________________________
  11.  
  12. src/http/Controllers/Controller.php
  13.  
  14. <?php
  15.  
  16. namespace App\http\Controllers;
  17.  
  18. abstract class Controller
  19. {
  20.     public function __construct()
  21.     {
  22.         echo "test";
  23.     }
  24.     public function index (){}
  25.     public function create (){}
  26.     public function store (){}
  27.     public function show (){}
  28.     public function edit (){}
  29.     public function update (){}
  30.     public function delete (){}
  31. }
  32. _____________________________________________
  33.  
  34. src/http/Controllers/TaskController.php
  35.  
  36. <?php
  37. namespace App\http\Controllers;
  38.  
  39. class TaskController extends Controller
  40. {
  41.     public function index (){}
  42.     public function create (){}
  43.     public function store (){}
  44.     public function show (){}
  45.     public function edit (){}
  46.     public function update (){}
  47.     public function delete (){}
  48. }
  49.  
  50. _____________________________________________
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement