2016-09-27 31 views

回答

1

在ProfileController可你的方法是這樣的

public function profile($profile){ 
    // you can call model function and get data from profile id 
//and then pass it to the view 
$data["profile_info"] = "fetch the data from database call your model function "; 
return View("your_bladefilename",$data); 

} 

您可以使用profile_info變量訪問刀片文件中的profile_info

在您的刀片文件中

<?php 

    print_r($profile_info); 

?> 

讓我知道是否有什麼不清楚

+0

它不工作 – rupesh

+0

我認爲你的問題是在路線 –

+0

你有沒有回聲「在這裏」;並在ProfileController的配置文件中退出? –