public function postAdd()
 {
     $validator = Validator::make(Input::all(), ['title' => 'required']);
     if ($validator->fails()) {
         Session::flash('message', ['title' => 'Uyarı!', 'text' => 'Lütfen! İşin adını giriniz ', 'type' => 'error']);
         return redirect()->back()->withInput();
     }
     $record = new Work();
     $record->user_id = 1;
     $record->customer_id = gets('customer_id');
     $record->title = gets('title');
     $record->price = gets('price');
     $record->amount = gets('amount');
     $record->content = gets('content');
     $record->status = 'publish';
     $record->date_start = gets('date_start');
     $record->date_end = gets('date_end');
     $record->save();
     if ($record->save()) {
         Session::flash('message', ['title' => 'Tebrikler!', 'text' => 'İş kaydı başarıyla eklenmiştir.', 'type' => 'success']);
         return redirect()->to(clink('customer-view', gets('customer_id')))->withInput();
     } else {
         Session::flash('message', ['title' => 'Hata!', 'text' => 'İş kaydı eklenemedi! Lütfen tekrar deneyiniz', 'type' => 'error']);
         return redirect()->back()->withInput();
     }
 }