single page controller not loading

i made a single page and add it on single pages list on dashboard and cache is OFF
the single page loading ok
but when i make a controller on controllers/single_page folder with same name of the single page the controller is not loading !!
my single page is mokhtar.php and the controller code on controllers\single_page folder is

class MokhtarController extends Controller {

public function view() {
echo "this is a test line .....";


why controller code is not loading

View Replies:
java9 replied on at Permalink Reply
Is it possible that you need some namespacing there? Classes are loaded based on provided namespace (as far as I understand it).
macnux replied on at Permalink Reply
what namespace i should write?
macnux replied on at Permalink Reply
i wrote this line on my controller
namespace Concrete\Controller\SinglePage;
it gives me error
Class 'Concrete\Controller\SinglePage\Controller' not found !!
macnux replied on at Permalink Reply
the controller file is loaded well because when i write print line at the top of it it prints that line
but the view function is not working !!