Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel 5积垢应用程序无法正常运行_Php_Laravel_Laravel 5_Crud - Fatal编程技术网

Php Laravel 5积垢应用程序无法正常运行

Php Laravel 5积垢应用程序无法正常运行,php,laravel,laravel-5,crud,Php,Laravel,Laravel 5,Crud,我对Laravel是新手,但我必须通过创建表单来创建和填充段落中的空白。我所需要的是,当我按下CreateForm上的submit按钮时,这些参数应该填充这个index.blade.php段落的空格。请看这个 @extends('layouts.app') @section('content') @foreach($items as $item) <tr> <p> This is to her

我对Laravel是新手,但我必须通过创建表单来创建和填充段落中的空白。我所需要的是,当我按下CreateForm上的submit按钮时,这些参数应该填充这个index.blade.php段落的空格。请看这个

@extends('layouts.app')
@section('content')
    @foreach($items as $item)
        <tr>
            <p>
                This is to hereby certify that, pursuant to ..... the Contract between ..... under the said
                contract,including all but not least, for ...... main and miscellaneous eqipment ..... have successfully
                supplied on dd/mm/yy
            </p>
        </tr>
    @endforeach
@endsection

谢谢。

我不太清楚您的问题,因为我知道您只希望在单击“提交”按钮后最后一个项目出现一段

如果我理解正确,您只需要将索引方法更改为

public function index()
{
    $item = SummeryForm::all()->last();
    return view('summeryform/index', compact('item'));
}
和index.blade.php

@extends('layouts.app')
@section('content')
     <tr>
         <p>This is to hereby certify that, pursuant to <td>{{ $item->po }}</td>  the Contract  between <td>{{ $item->company }}</td> under the said contract,including all but not least, for <td>{{ $item->boq_name }}</td> main and miscellaneous eqipment for <td>{{ $item->project_name }}</td> have successfully supplied on dd/mm/yy</p>
    </tr>
@endsection
@extends('layouts.app'))
@节(“内容”)
兹证明,根据{{{$item->po},上述合同下{{$item->company}之间的合同,包括{$item->boq_name}的{{$item->boq_name}主要和杂项设备,已于年月日成功供应

@端部
您是正确的sir。但是它给出了这个错误…未定义的变量:项目(视图:c\xAMPP\HTDOCS\demo\Reals\Dave\SemeSyp\\Calpult.Prph.php)。您可能想考虑缩小这个问题,使其更加集中,只包括代码中的一个小的孤立测试用例块;很难说出你在问什么。
public function index()
{
    $item = SummeryForm::all()->last();
    return view('summeryform/index', compact('item'));
}
@extends('layouts.app')
@section('content')
     <tr>
         <p>This is to hereby certify that, pursuant to <td>{{ $item->po }}</td>  the Contract  between <td>{{ $item->company }}</td> under the said contract,including all but not least, for <td>{{ $item->boq_name }}</td> main and miscellaneous eqipment for <td>{{ $item->project_name }}</td> have successfully supplied on dd/mm/yy</p>
    </tr>
@endsection