Trouble with creating use class

I try to get the string like use app\widget\menu1\Menu; by typing the command <?php new Menu;?> it stays like that <?php new app\widgets\menu1\Menu();?>, but string use app\widget\menu1\Menu; don't appears at start of document.What I do wrong?Help me please.

Fatal error: Class 'app\widgets\menu1\Menu' not found in I:\OSPanel\domains\mysite\app\views\layouts\shoes.php on line 58

1 comment

Not really sure I got you right. Does this file have a namespace declared? Are you using any kind of autoloader?

Please attach the file, maybe it'll clarify the use case. Thank you!


Please sign in to leave a comment.