UI代码:resources\views\DistributorRegistration.php
<?php
namespace resources\views;
class DistributorRegitrationForm
{
public function distributorRegitrationFormHtml(){
return '<h1>Hello</h1>';
}
}
?>
在Controler类中:app\Http\Controllers\DistributorRegistration.php
<?php
namespace App\Http\Controllers;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use resources\views\DistributorRegistration;
class DistributorRegistration extends Controller
{
function VestigePOS_GRNHandler(Request $request){
//$id = $request->input('id');
return view(DistributorRegitrationForm::distributorRegitrationFormHtml()) ;
}
}
?>
我在路线中呼叫控制器时收到此错误:
致命错误:未找到类'App \ Http \ Controllers \ DistributorRegitrationForm'