IMMREX7

aku nok ndi : /home/spdtg/www/gomygps/resources/views/master/
File Up :
aku nok ndi : /home/spdtg/www/gomygps/resources/views/master/companies.blade.php

@extends('main')
@section('content')
<div class="row clearfix">
    <div class="col-sm-6">
        <div class="card">
            <div class="header">
                <h2><strong>@if(isset($company))Edit @else  Add @endif</strong> Company</h2>
            </div>
            <div class="body">
                @if(isset($company))
                {!! Form::model($company, ['method' => 'PATCH', 'action' => ['CompanyController@update', $company->idCompany],'files'=>true, 'class' => 'form-horizontal']) !!}
                @else
                {!! Form::open(['url' => 'companies', 'class' => 'form-horizontal','files'=>true]) !!}
                @endif

                <div class="row clearfix">
                    <div class="col-sm-4 form-control-label required">
                        <label for="classname">Company Name</label>
                    </div>
                    <div class="col-sm-5">
                        <div class="form-group">
                            {!! Form::text('companyName',null,['class' => 'form-control','maxlength'=>'100','required'=>'required']) !!}
                            @if ($errors->has('companyName'))
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong>{{ $errors->first('companyName') }}</strong>
                            </label>
                            @endif
                        </div>
                    </div>
                </div>
                
                <div class="row clearfix">
                    <div class="col-sm-8 offset-sm-2">
                        @if(isset($company))
                        {!! Form::submit('UPDATE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}
                        @else
                        {!! Form::submit('SAVE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}
                        @endif
                        {!! Form::close() !!} 
                    </div>
                </div>

            </div>
        </div>
    </div>
    <div class="col-sm-6">
        <div class="card">
            <div class="header">
                <h2><strong>List Of Company</strong></h2>
            </div>
            <div class="body table-responsive">
                <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                    <thead>
                        <tr>
                            <th>S. No.</th>
                            <th>Name</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 1; ?>
                        @foreach($companies as $var)
                        <tr>
                            <th scope="row">{{$i}}</th>
                            <td>{{$var->companyName}}</td>
                            <td><a href="{{url('companies/'.$var->idCompany.'/edit')}}" class="btn btn-sm btn-success">Edit</a></td>
                        </tr>
                        <?php $i++; ?>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
@stop

Copyright © 2021 - 2025 IMMREX7