私はLaravel5.5とModuleパッケージを使用しています。私は、一人の学生のモジュールを持っており、フロントエンドのデフォルトとしてこれを作りたい、laravelのデフォルトルート/ web.phpのようにコミットコード
ここに私の学生の路線です:ルーティング[モジュール名]のヒントパスがありません
<?php
Route::group(['middleware' => 'web', 'namespace' => 'Modules\Student\Http\Controllers'], function() {
/** Frontend routes which does not require authentication
*
*/
Route::get('/', '[email protected]')->name('frontend.home');
Route::get('/program-search', '[email protected]')->name('student.programs');
Route::get('/univeristy-search', '[email protected]')->name('student.universities');
});
そして、ここでは私のコントローラであり、コード:
<?php
namespace Modules\Student\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use Modules\Admin\Http\Models\ProgramCategory;
use Modules\University\Http\Models\Program;
use Modules\Student\Http\Models\Student;
use Modules\University\Http\Models\University;
class FrontEndController extends Controller
{
/**
* Display a listing of the resource.
* @return Response
*/
public function index()
{
return view('student::index');
}
/**
* Show all programs
*/
public function programs(){
$categories = ProgramCategory::orderBy('catagory_name')
->where('status', '=', 'active');
$programs = Program::orderBy('program_name')
->where([
['status', '=', 'active']
]);
$programs->categories = $categories;
return view('student::program_list')
->withPrograms($programs);
}
public function univerities()
{
return view('student::university_list');
}
}
最初のルート '/'のみが動作しています。 '/ program-search'と '/ univeristy-search'にアクセスしようとすると、"No hint path defined for [sutdent]. (View: /var/www/development/unigatenew/Modules/Student/Resources/views/university_list.blade.php)"
のようなエラーが発生します。
私は何をしていますか?誰でもこれを助けることができますか?