Beispiel #1
0
 public function onPageFileDetails($periode)
 {
     $query = \App\Models\File::leftJoin('users', 'users.id', '=', 'files.created_by')->leftJoin('companies', 'companies.id', '=', 'files.company_id')->select('files.*')->selectRaw("YEAR(files.created_at) as year")->addSelect("users.first_name as upload_name")->addSelect("files.created_at as upload_at")->addSelect("companies._id as company_id")->addSelect("companies.name as company_name")->where('files.active', '=', '1')->first();
     if ($query !== null) {
         echo $query->name;
     } else {
         echo "Detail is empty";
     }
 }