Siasatan rangka kerja TP5
cykeyan
cykeyan 2019-10-13 11:24:33
0
4
1168

kelas Jijiajian memanjangkan Pangkalan
{

fungsi awam jijiajianList()
{

$jijiajianList = JijiajianModel::all();

$jijiajianModel::count(); sebagai $ nilai ) {D $ data = [
'id' = & gt; $ nilai-& gt;
'nama' => $nilai->nama,
'shuliang' => >leibie,
'guige' => $value->guige,
'leibie2' => $value->leibie2,
'beizhu ' => => $value->luruyuan,
'lururiqi' => $value->lururiqi,
;status,
          'create_time' => $value-> ;create_time                                                                                                                                                                                                                                                      'masa_buat'                                         " <span style="color:red;">Tidak ditugaskan</span>',
                                                                                                                     

                                                          lihat -                                                                                                                                         > fetch('jijiajian');
}

<?php

namespace appindexmodel;

gunakan model fikir model Jielete;

. format paparan tarikh dan masa bagi jadual semasa

dilindungi $dateFormat = 'Y/m/d';

//Tentukan medan masa pemadaman dalam jadual untuk merekodkan masa pemadaman

dilindungi $deleteTime = 'delete_time'


// Dayakan penulisan automatik cap waktu
dilindungi $autoWriteTimestamp = benar;

dilindungi $createTime = 'create_time';


protected $updateTime = 'update_time';

// Tentukan sifat autolengkap
dilindungi $insert = [' status' => 1];


public function goggyika()

{

return $this->belongsTo('gongyika');

}


// Tentukan kaedah persatuan

( /* ) {{

Kembalikan $ This-& gt; Hasmany ('Pelajar'); kod yang sama, jadual lain bolehlah
//Tetapkan format paparan tarikh dan masa lalai bagi jadual semasa
dilindungi $dateFormat = 'Y/m/d';

//Tentukan medan masa pemadaman dalam jadual untuk merekod pemadaman Masa
  protected $deleteTime = ' delete_time';

  // Dayakan penulisan automatik cap waktu
  protected $autoWriteTimestamp = benar

  protected $createTime = 'create_time'

  protected $autoWriteTimestamp =       protected ;                                                                                                                                                                                                                                                 



fungsi awam jijiajian()
                                                                                                                                                                                                                                                                                                                                                                                                                                                              
namespace appindexcontroller;
gunakan thinkRequest;
kelas Gongyika meluaskan Pangkalan
{

​​ fungsi awam gongyikaList()

​​ $ gongyikaList = GongyikaModel::all();
//$gongyikaList =GongyikaModel::select();




                                                                                                                                                                                                                                                                                              

                                                                                                                                                                                                                                                                                          gt; $value->chanpinxinghao, //Model produk
                                                                                                                                                                                                                                                                                                                                                                                             nilai -& gt; nama bahagian
'cailiao' = & gt; bahan
'maopizhonglei' = & gt; $ nilai- & gt; // Jenis kasar
'' pihao '= > /Nombor proses
'gongxuname' => 'gongbuhao' => >gongxuneirong, //Proses kandungan
'sel1' => $value->sel1, //Model peralatan
'sel2' => $value->sel2, //Model alat
'zhunbeigongshi' => ; $ nilai-& gt; // Sediakan waktu kerja -& gt;'jijiajian' => isset($nilai->jijiajian->tuhao)? ;',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     tugaskan('gongyikaList', $gongyikaList);
               $this ->  ,     ;   ;                                                                                                                                                                                                                                                                                                          shebei1');
}

cykeyan
cykeyan

membalas semua(2)
cykeyan

Terima kasih, Encik Zhu Masalah ini telah diselesaikan Kod medan tersembunyi yang hilang telah diubah suai dan dijalankan dengan jayanya.

Peter-Zhu

Sila berikan mesej ralat bersama-sama

  • balas Cikgu Zhu, bolehkah program PHP, pelayan Apache dan alat phpstudy kami berjalan tanpa menyambung ke rangkaian luaran, iaitu dalam LAN dalaman?
    cykeyan pengarang 2019-11-26 08:56:02
  • balas Saya telah berhubung dengan projek ERP, dan pelanggan memintanya untuk digunakan pada intranet
    cykeyan pengarang 2019-11-26 08:57:08
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan