This question has long been tormenting me, but I really can’t really understand where to correctly point the path '/' and where '\'. Now I have encountered this problem on Laravel

Route::get('/admin', 'Admin/AdminController@index'); - выдает ошибку Route::get('/admin', 'Admin\AdminController@index'); - работает 

The same thing in Codigniter one function returns the path as root/folder/file another roote\foolder\file explain the difference please.

  • one
    You are confusing the file path and class namespace. In this case, Admin\AdminController is the AdminController class in the namespace Admin - apelsinka223
  • I thought namespace is the same way that indicates where you should connect classes - quaresma89

1 answer 1

Definition namespace , article on Habré , another article