PHP Classes

File: src/views/crud/edit.blade.php

Recommend this page to a friend!
  Classes of TJ Webb   Laravel CRUD Generator   src/views/crud/edit.blade.php   Download  
File: src/views/crud/edit.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel CRUD Generator
Generate MVC classes for any Laravel model
Author: By
Last change:
Date: 4 years ago
Size: 1,042 bytes
 

Contents

Class file image Download
@extends('crud::layout')
@section('header')
<div class="row">
    <div class="col-lg-12 margin-tb">
        <div class="pull-left">
            <h2>Edit {{Str::plural($modelName)}}</h2>
        </div>
        <div class="pull-right">
            <a class="btn btn-primary" href="{{ route($routeRoot . '.index') }}"> Back</a>
        </div>
    </div>
</div>
@endsection

@section('content')
<form action="{{ route($routeRoot . '.update', $model->id) }}" method="POST">
    @csrf
    @method('PUT')
    <div class="row">
        @foreach($fields as $field)
            @php
                $value = $model->{$field->getColumnName()};
                $fieldColumnName = $field->getColumnName();
                $fieldDisplayName = $field->getDisplayName();
            @endphp

            @include(field_view($modelName, $field, 'edit'))

        @endforeach
        <div class="col-xs-12 col-sm-12 col-md-12 text-center">
            <button type="submit" class="btn btn-primary">Submit</button>
        </div>
    </div>
</form>
@endsection