TP5 framework inquiry
cykeyan
cykeyan 2019-10-13 11:24:33
0
4
1176

class Jijiajian extends Base
{
   
    public function  jijiajianList()
    {
      
       $jijiajianList = JijiajianModel::all();

        $count = JijiajianModel::count();
  
       
        foreach ($jijiajianList as $value){
            $data = [
     &nbs

        $this -> view -> assign('jijiajianList', $jijiajianList);
        $this -> view -> assign('count', $count);

        return $this -> view -> fetch('jijiajian');
    }

<?php

namespace app\index\model;
use think\Model;
use traits\model\SoftDelete;

class Jijiajian extends Model
{
    //引用软删除方法集
   



public function jijiajian()
{
// The class table and the teacher table are 1-to-1 related
Return $this->hasOne('jijiajian');
}
 
}

<?php
namespace app\index\controller;

use app\index\model\Gongyika as GongyikaModel;
use app\index\model\Jijiajian;
use think\Request;
class Gongyika extends Base
{
     
    public function gongyikaList()#%

                                                                                                                                                                                          . chanpinxinghao' => $value->chanpinxinghao, //�%'jijiajian' => isset($value->jijiajian->tuhao)? $value->jijiajian->tuhao : '<span style="color:red;">Not allocated</ span>',
                                                                     ##

cykeyan
cykeyan

reply all(2)
cykeyan

Thank you, Mr. Zhu. This problem has been solved. The missing hidden field code has been modified and run successfully.

Peter-Zhu

Please provide the error message

  • reply Teacher Zhu, can our PHP program, Apache server and phpstudy tool run without connecting to the external network, that is, within the internal LAN?
    cykeyan author 2019-11-26 08:56:02
  • reply I came into contact with an ERP project, and the customer asked for it to be used on the intranet
    cykeyan author 2019-11-26 08:57:08
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template