本文整理汇总了PHP中app\File::roots方法的典型用法代码示例。如果您正苦于以下问题:PHP File::roots方法的具体用法?PHP File::roots怎么用?PHP File::roots使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\File
的用法示例。
在下文中一共展示了File::roots方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($conName)
{
$this->connName = $conName;
$this->connObj = new Provider($conName);
$query = File::roots()->where('token_id', $this->connObj->getTokenId())->first();
if ($query !== null) {
$this->root = $query;
// $this->root->delete();
} else {
$this->root = File::create(['name' => 'root', 'path' => $this->connObj->getProvider(), 'token_id' => $this->connObj->getTokenId()]);
}
}
示例2: getFirstLevel
public function getFirstLevel()
{
$que = User::find($this->usrId)->tokens;
$data = collect();
foreach ($que as $d) {
$root = File::roots()->where('token_id', $d->id)->first();
if ($root !== null) {
$data = $data->merge($root->getImmediateDescendants());
}
}
return $data;
}
示例3: showFromToken
public function showFromToken()
{
$link = Link::where("url", $_GET['tokens'])->first();
$root = File::roots()->where('link_id', $link->id)->first();
$usr = User::where('id', $link->user_id)->first();
$data = $root->getDescendants();
$logo = array();
foreach ($data as $d) {
array_push($logo, Providers::where('id', Token::where('id', $d->token_id)->first()->provider_id)->first()->provider_logo);
}
return view('pages.gtl.gtl-another-seen', ['data' => (object) $data, 'logo' => $logo, 'lname' => $link->link_name, 'usr' => $usr]);
// Show GatherLink Owner name na ja.
}