/**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     $rules = ['description' => 'required'];
     $last = \GLobalHelper::lastUrl();
     if (is_numeric($last)) {
         $rules['name'] = 'required|unique:campaign_category,name,' . $last . ',id';
     } else {
         $rules['name'] = 'required';
     }
     return $rules;
 }
Esempio n. 2
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     $rules = ['content' => 'required', 'image' => 'max:2000|mimes:jpeg,gif,png'];
     $last = \GLobalHelper::lastUrl();
     if (is_numeric($last)) {
         // $rules['group_name'] = 'required|unique:groups,group_name,'.$last.',id';
         $rules['title'] = 'required';
     } else {
         $rules['title'] = 'required';
     }
     return $rules;
 }
Esempio n. 3
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     $rules = ['description' => 'required'];
     $last = \GLobalHelper::lastUrl();
     if (is_numeric($last)) {
         $rules['group_name'] = 'required|unique:groups,group_name,' . $last . ',id';
         // $rules['order'] = 'required';
     } else {
         $rules['group_name'] = 'required';
         // $rules['order'] = 'required';
     }
     return $rules;
 }
Esempio n. 4
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     $rules = ['description' => 'required', 'image' => 'max:2000|mimes:jpeg,gif,png'];
     $last = \GLobalHelper::lastUrl();
     if (is_numeric($last)) {
         $rules['name'] = 'required';
         // $rules['order'] = 'required';
     } else {
         $rules['name'] = 'required';
         // $rules['order'] = 'required';
     }
     return $rules;
 }
Esempio n. 5
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     $rules = ['id_group' => 'required', 'status' => 'required', 'no_telp' => 'required', 'fullname' => 'required', 'image' => 'max:2000|mimes:jpeg,gif,png'];
     $last = \GLobalHelper::idUrlEdit();
     if (!empty($last)) {
         $rules['username'] = '******' . $last . ',id';
         $rules['password'] = '******';
         $rules['email'] = 'required|email|unique:users,email,' . $last . ',id';
     } else {
         $rules['username'] = '******';
         $rules['password'] = '******';
         $rules['email'] = 'required|email|unique:users,email';
     }
     return $rules;
 }
Esempio n. 6
0
 public static function otherNewsletter($key)
 {
     $data = \App\Models\Newsletter::whereNotIn('id', [$key])->get();
     $return = "";
     foreach ($data as $key => $value) {
         $param = url('newsletter/detail/' . $value->id . '/' . preg_replace('/\\s+/', '', GlobalHelper::formatDate($value->created_at, 'd m Y')) . '/' . $value->slug);
         $return .= '<div class="media">
                         <div class="pull-left">
                         <a href="' . $param . '"><img src="' . GlobalHelper::checkImage($value->image, 'article') . '" style="width:52px;height:52px" alt=""></a>
                    </div>
                    <div class="media-body">
                            <h4><a href="' . $param . '">' . GLobalHelper::softTrim($value->title, 51) . ',</a></h4>
                            <p>posted on  ' . GLobalHelper::formatDate($value->created_at, 'd F Y') . '</p>
                        </div>
                    </div>';
     }
     return $return;
 }
Esempio n. 7
0
<?php

$segment = GLobalHelper::indexUrl();
?>
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

        <ul class="sidebar-menu">

            {{-- Untuk tampilan menu dropdown --}}
            {{--<li class="treeview {!! $segment == 'report-attendace' || $segment == 'report-salary' ? 'active' : '' !!}">--}}
            {{--<a href="#">--}}
            {{--<i class="fa fa-pie-chart"></i>--}}
            {{--<span>Laporan</span>--}}
            {{--<i class="fa fa-angle-left pull-right"></i>--}}
            {{--</a>--}}
            {{--<ul class="treeview-menu">--}}
            {{--<li class="{!! $segment == 'report-attendace' ? 'active-treeview' : '' !!}">--}}
            {{--<a href="{!! url('report-attendace') !!}">--}}
            {{--<i class="fa fa-line-chart"></i> <span>Laporan Kehadiran</span>--}}
            {{--</a>--}}
            {{--</li>--}}
            {{--<li class="{!! $segment == 'report-salary' ? 'active-treeview' : '' !!}" style="display:none">--}}
            {{--<a href="{!! url('report-salary') !!}">--}}
            {{--<i class="fa fa-line-chart"></i> <span>Laporan Gaji</span>--}}
            {{--</a>--}}
            {{--</li>--}}
            {{--</ul>--}}
            {{--</li>--}}
            <li class="header">KONFIGURASI</li>