Change method boot
use Carbon\Carbon;
public function boot()
{
config(['app.locale' => 'id']);
| error: function (xhr) { | |
| console.log(xhr); | |
| if (xhr.readyState === 4) { | |
| if (xhr.status === 404) { | |
| swal({ | |
| type: 'error', | |
| title: 'Oops...', | |
| text: xhr.responseJSON.error, | |
| }); | |
| } else { |
| @extends('index') | |
| @section("contentheader_title") | |
| Detail Produk {{ ucfirst($product->product) }} | |
| @endsection | |
| @section('customcss') | |
| <link rel="stylesheet" href="{{ asset('/plugins/datatables/dataTables.bootstrap.css') }}"> | |
| <link rel="stylesheet" href="{{ asset('/plugins/datatables/jquery.dataTables.min.css') }}"> |
| @extends('index') | |
| @section('contentheader_title','Master Produk') | |
| @section('customcss') | |
| <link rel="stylesheet" href="{{ asset('/plugins/datatables/dataTables.bootstrap.css') }}"> | |
| <link rel="stylesheet" href="{{ asset('/plugins/datatables/jquery.dataTables.min.css') }}"> | |
| @endsection | |
| @section('content') |
| #############blade | |
| <!-- Modal edit--> | |
| <div id="modal-edit" class="modal fade" role="dialog"> | |
| <div class="modal-dialog"> | |
| <!-- Modal content--> | |
| <div class="modal-content"> | |
| <div class="modal-header"> | |
| <button type="button" class="close" data-dismiss="modal">×</button> |
| `DEFINE FUNCTION` | |
| protected function getCode() | |
| { | |
| /*PATTERN | |
| 'LINK' + year date + month date + '0000' | |
| '0000' is generate number 4 digit | |
| */ | |
| @extends('index') | |
| @section('contentheader_title','Master User') | |
| @section('customcss') | |
| <link rel="stylesheet" href="{{ asset('/plugins/datatables/dataTables.bootstrap.css') }}"> | |
| <link rel="stylesheet" href="{{ asset('/plugins/datatables/jquery.dataTables.min.css') }}"> | |
| @endsection | |
| @section('content') |
| public function classes($teacherId) | |
| { | |
| $teacherClass = | |
| TeacherClass::join('m_class','m_class.id','m_teacher_class.class_id') | |
| ->select('m_teacher_class.class_id','m_class.name as name_class', | |
| DB::raw("(select COUNT(*) from m_student where m_student.class_id = m_teacher_class.class_id ) as student") | |
| ) | |
| ->where('teacher_id',$teacherId)->get(); | |
| dd($teacherClass); | |
| } |
| //view | |
| <form action="you/url" method="get"> | |
| //this chekcbox on loop | |
| <input type="checkbox" name="id[]" value="{{$gallery->id}}" id="child" class="child"> | |
| // chekcbox parent outside loop | |
| <input type="checkbox" name="parent" id="parent"> | |
| //submit form |
| <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> | |
| <!-- Indicators --> | |
| <ol class="carousel-indicators"> | |
| @foreach( $trip->photos as $photo ) | |
| <li data-target="#carousel-example-generic" data-slide-to="{{ $loop->index }}" class="{{ $loop->first ? 'active' : '' }}"></li> | |
| @endforeach | |
| </ol> | |
| <!-- Wrapper for slides --> |