1//accessing any function in the controller (this is web.php file)
2use App\Http\Controllers\PostsController;
3
4Route::get('/post', 'App\Http\Controllers\PostsController@index');
1Uncomment this line in app>>provider>>RouteServiceProvider.php file
2// protected $namespace = 'App\\Http\\Controllers';