Esempio n. 1
0
 public function create()
 {
     $user = Auth::user();
     $expiredDefault = Carbon::now()->addMonths(1)->format('Y/m/d');
     $expiredDefault = jDate::forge($expiredDefault)->format('Y/m/d');
     $announcement = new \stdClass();
     $announcement->expired_at = $expiredDefault;
     return view('admin.announcement.create', compact('user', 'announcement'))->with(['title' => 'Create Announcement']);
 }
Esempio n. 2
0
 /**
  * Created By Dara on 30/10/2015
  * get the expired_at diff for humans & shamsi
  */
 public function getDiffExpiredAtAttribute()
 {
     $coupon = CouponGallery::where('id', $this->attributes['coupon_gallery_id'])->firstOrFail();
     $expired_at = $coupon->expired_at;
     return jDate::forge($expired_at)->ago();
 }
Esempio n. 3
0
 public function getShamsiCreatedAtAttribute()
 {
     return jDate::forge($this->attributes['created_at'])->format('Y/m/d');
 }
Esempio n. 4
0
 /**
  * Created by Emad Mirzaie on 02/09/2015.
  * change password form
  */
 public function password()
 {
     $last_update = jDate::forge(Auth::user()->updated_at)->ago();
     return view('profile.password', compact('last_update'))->with(['title' => trans('profile.changePassword')]);
 }
Esempio n. 5
0
 public function getShamsiHumanCreatedAtAttribute()
 {
     return jDate::forge($this->attributes['created_at'])->ago();
 }
Esempio n. 6
0
 public function getShamsiUpdatedAtAttribute()
 {
     return jDate::forge($this->attributes['updated_at'])->format('%A %d %B %Y ');
 }
Esempio n. 7
0
 public function getShamsiExpiredAtAttribute()
 {
     return jDate::forge($this->attributes['expired_at'])->format("Y/m/d H:i:s");
 }
Esempio n. 8
0
 public function getShamsiExpiredAtAttribute()
 {
     $created_at = $this->attributes['created_at'];
     $expired_at = Carbon::parse($created_at)->addWeek(1);
     return jDate::forge($expired_at)->format("Y/m/d");
 }
Esempio n. 9
0
 public function skillTables(Skill $skill, PaperRepository $paperRepository, HistoryRepository $historyRepository)
 {
     $experiences = $skill->experiences()->get();
     $degrees = $skill->degrees()->get();
     $honors = $skill->honors()->get();
     $histories = $skill->histories()->get();
     $papers = $skill->papers()->get();
     $papers_type = $paperRepository->type_name();
     $history_penetration = $historyRepository->penetration_name();
     $years_list = [];
     for ($i = jDate::forge('now')->format('%Y'); $i >= jDate::forge('now - 40 years')->format('%Y'); $i--) {
         $years_list[$i] = $i;
     }
     return view('profile.newSkill', compact('skill', 'experiences', 'degrees', 'honors', 'histories', 'papers', 'papers_type', 'years_list', 'history_penetration'))->with(['title' => 'ثبت مهارت جدید', 'new_skill' => 0, 'edit_skill' => 1, 'step' => 2, 'hasEdit' => 1]);
 }