Пример #1
0
 public static function getcontact_person($id)
 {
     $contact_person = contact_person::where('customer_id', '=', $id)->get();
     $contact_data = "";
     foreach ($contact_person as $contact) {
         $contact_data .= Contact::contact_template($contact);
     }
     echo $contact_data;
 }
Пример #2
0
@extends('Member.master')
@section('content')
<?php 
use App\Http\Controllers\Customercontrol;
use App\Http\Controllers\Customer\Contact;
$id = Route::Input('id');
$customerid = Contact::get_contact_in($id, 'customer_id');
$root_url = dirname($_SERVER['PHP_SELF']);
?>
<div id="page-wrapper">
  <div class="row">
    <div class="col-lg-12">
      <h1 class="page-header">รายละเอียดลูกค้า - {{ Customercontrol::get($customerid,'name') }}</h1>
    </div>
    <!-- /.col-lg-12 -->
  </div>

  <!-- /.row -->
  <div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">แก้ไขผู้ประสานงาน - {{ Contact::get_contact_in($id,'name') }}</h3>
            </div>
            <div class="panel-body">
                  @if (count($errors) > 0)
                    <div class="alert alert-danger">
                      <strong>เกิดข้อผิดพลาด!</strong> กรุณากรอกข้อมูลตามเงื่อนไขที่กำหนด<br><br>
                    <ul>
                      @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>