jeudi 26 septembre 2019

Use of undefined constant content - assumed 'content' (this will throw an Error in a future version of PHP)

i try to create crud operation when i go to page i will display this error

enter image description here

extends('layouts.app')

@section(content)
<table class="table table-bordered table-striped">
    <tr>
        <th width="10%">Event Name</th>
        <th width="35%">Event Description</th>
        <th width="35%">Event Date</th>
        <th width="30%">Action</th>
    </tr>
    @foreach($data as $row)
    <tr>
            <td></td>
            <td></td>
            <td></td>
    </tr>
    @endforeach
    </table>
    {!! $data->links() !!}
@endsection

Route::resource('curd','CrudsController');

class CrudsController extends Controller
{
    public function index()
    {
        $data = Crud::latest()->paginate(5);
        return view('index', compact('data'))
                ->with('i', (request()->input('page', 1) - 1) * 5);
    }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire