'date', 'updated_at' => 'date', 'deleted_at' => 'date', 'editable' => 'boolean', ]; /** * @param $value * * @return mixed * @throws NotFoundHttpException */ public static function routeBinder($value) { if (auth()->check()) { $model = self::where('id', $value)->first(); if (!is_null($model)) { return $model; } } throw new NotFoundHttpException; } public function transactionJournalLinks() { return $this->hasMany(TransactionJournalLink::class); } }