CMS Info for Header, dyn. Tage, API

This commit is contained in:
Kevin Adametz 2019-12-28 20:15:25 +01:00
parent 7294ccc1d0
commit bed91c4f4a
49 changed files with 3476 additions and 1562 deletions

View file

@ -22,7 +22,7 @@ class CMSContentController extends Controller
return response()->json(['error' => "request no found"], $this->successStatus);
}
if($request['key'] != 'f6077389c9ce710e554763a5de02c8ec'){
if($request['key'] !== 'f6077389c9ce710e554763a5de02c8ec'){
return response()->json(['error' => "key"], 401);
}

View file

@ -0,0 +1,233 @@
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Models\CMSInfo;
use App\Models\CMSInfoAvailable;
use App\Models\CMSInfoHoliday;
use App\Services\HTMLHelper;
class CMSContentInfoController extends Controller
{
public $successStatus = 200;
public function headerInfo()
{
$request = \Request::all();
/* if(!isset($request['url']) || !isset($request['key'])){
return response()->json(['error' => "request no found"], $this->successStatus);
}
if($request['key'] !== 'f6077389c9ce710e554763a5de02c8ec'){
return response()->json(['error' => "key"], 401);
}*/
$ret = [];
$days = HTMLHelper::getDeDays();
$locals = CMSInfoAvailable::whereType('local')->whereSpecial(false)->get();
foreach ($locals as $value){
$date = CMSInfoAvailable::getWeekWithDate($value->wday);
$ret['local'][$date['date']] = [
'day'=>$days[$value->wday],
'active' => $value->active,
'from' => $value->from,
'to' => $value->to,
];
}
$phones = CMSInfoAvailable::whereType('phone')->whereSpecial(false)->get();
foreach ($phones as $value){
$date = CMSInfoAvailable::getWeekWithDate($value->wday);
$ret['phone'][$date['date']] = [
'day'=>$days[$value->wday],
'active' => $value->active,
'from' => $value->from,
'to' => $value->to,
];
}
$specials = CMSInfoAvailable::whereSpecial(true)->get();
foreach ($specials as $special){
$ret[$special->type][$special->date] = [
'day'=>$days[$special->wday],
'active' => $special->active,
'from' => $special->from,
'to' => $special->to,
];
}
// ksort($ret);
$ret['info']['office_important_note_active'] = CMSInfo::getContentBySlug('office-important-note-active');
$ret['info']['office_important_note'] = CMSInfo::getContentBySlug('office-important-note');
$ret['info']['office_appointment'] = CMSInfo::getContentBySlug('office-appointment');
$now = \Carbon::now();
$wday = $now->dayOfWeekIso;
$ret['available']['local'] = $this->checkAvailable('local', $wday);
$ret['available']['phone'] = $this->checkAvailable('phone', $wday);
return response()->json(['success' => "content", "ret"=>$ret], $this->successStatus);
}
private function checkAvailable($type, $wday){
$contents = [];
$contents['local'] = [
1 => " keinen Eintrag",
2 => "öffnet am #day#",
3 => "schließt um #to# Uhr",
4 => "öffnet am #n-day# um #from# Uhr",
5 => "ab #from# Uhr",
];
$contents['phone'] = [
1 => " keinen Eintrag",
2 => "ab #day#",
3 => "bis #to# Uhr",
4 => "ab #n-day# um #from# Uhr",
5 => "ab #from# Uhr",
];
$now = \Carbon::now();
//holidays
if($next_date = $this->checkBetweenHoliday($type, $now)){
$content = str_replace('#day#', $next_date, $contents[$type][2]);
return ['active' => 0, 'content'=>$content];
}
$now = \Carbon::now();
$minutes = $now->hour*60 + $now->minute;
if($special = $this->checkDateforSpecial($type, $wday, $now->format("d.m.Y"))) {
if($special->active) {
$from = $special->fromMinutes();
$to = $special->toMinutes();
//open to
if($minutes >= $from && $minutes <= $to){
$content = str_replace('#to#', $special->to, $contents[$type][3]);
return ['active' => 1, 'content'=> $content];
}
//is close, but open today
if($minutes < $from && $minutes < $to) {
$content = str_replace('#from#', $special->from, $contents[$type][5]);
return ['active' => 0, 'content'=> $content];
}
}
}else{
$available = CMSInfoAvailable::getContentBySlug($type, $wday);
if(!$available){
return ['active' => 0, 'content'=> $contents[$type][1]];
}
if($available->active) {
$from = $available->fromMinutes();
$to = $available->toMinutes();
//open to
if($minutes >= $from && $minutes <= $to){
$content = str_replace('#to#', $available->to, $contents[$type][3]);
return ['active' => 1, 'content'=> $content];
}
//is close, but open today
if($minutes < $from && $minutes < $to) {
$content = str_replace('#from#', $available->from, $contents[$type][5]);
return ['active' => 0, 'content'=> $content];
}
}
}
//is next day
$next = $this->getNextActiveDay($type, $wday, $contents);
if($next){
return $next;
}
return ['active' => 0, 'content'=> $contents[$type][1]];
}
private function getNextActiveDay($type, $wday, $contents){
$days = HTMLHelper::getDeDays();
$counter = 0;
while ($counter <= 6) {
$counter++;
$wday = $wday < 7 ? $wday+1 : 1;
$w = CMSInfoAvailable::getWeekWithDate($wday);
$wDate = \Carbon::parse($w['date']);
if($next_date = $this->checkBetweenHoliday($type, $wDate)){
$content = str_replace('#day#', $next_date, $contents[$type][2]);
return ['active' => 0, 'content'=>$content];
}
if($special = $this->checkDateforSpecial($type, $wday, $wDate->format("d.m.Y"))){
if($special->active) {
$content = str_replace('#from#', $special->from, $contents[$type][4]);
$content = str_replace('#n-day#', $days[$special->wday], $content);
return ['active' => 0, 'content'=> $content];
}
}
$available = CMSInfoAvailable::getContentBySlug($type, $wday);
if(isset($available) && $available->active){
//is in holiday?
$content = str_replace('#from#', $available->from, $contents[$type][4]);
$content = str_replace('#n-day#', $days[$available->wday], $content);
return ['active' => 0, 'content'=> $content];
}
}
return false;
}
private function checkBetweenHoliday($type, \Carbon $cdate){
$holidays = CMSInfoHoliday::where($type, true)->get();
foreach ($holidays as $holiday){
//is in range?
$from = \Carbon::parse($holiday->from);
$to = \Carbon::parse($holiday->to);
if($cdate->between($from, $to)){
$to->modify('+1 day');
return $to->format("d.m.Y");
}
}
return false;
}
private function checkDateforSpecial($type, $wday, $date){
$specials = CMSInfoAvailable::whereType($type)->whereWday($wday)->whereSpecial(true)->get();
foreach ($specials as $special){
if($special->date == $date){
return $special;
}
}
}
}

View file

@ -58,7 +58,7 @@ class FewoController extends Controller
'zipcode',
'city',
'phone',
'fax',
'mobile',
'travel_nationality_id'
];

View file

@ -29,7 +29,9 @@ class CMSContentInfoController extends Controller
public function index()
{
$data = [
'days' => $this->createWeekWithDate(),
'days' => CMSInfoAvailable::getWeekWithDate(),
'specials_local' => CMSInfoAvailable::getSpecialsBy('local'),
'specials_phone' => CMSInfoAvailable::getSpecialsBy('phone'),
'cms_holidays' => CMSInfoHoliday::all(),
];
return view('cms.content.info.index', $data);
@ -52,6 +54,19 @@ class CMSContentInfoController extends Controller
}
}
//save in CMSInfoAvailable SPECIALS
if(isset($data['special_availables']) && is_array($data['special_availables'])){
foreach ($data['special_availables'] as $id=>$values){
$special_available = CMSInfoAvailable::findOrFail($id);
$cdate = \Carbon::parse($values['date']);
$values['wday'] = $cdate->dayOfWeekIso;
$special_available->fill($values)->save();
}
}
//save in CMSinfoHolidays
if(isset($data['info_holidays']) && is_array($data['info_holidays'])){
foreach ($data['info_holidays'] as $id=>$val){
@ -75,6 +90,34 @@ class CMSContentInfoController extends Controller
CMSInfoHoliday::create();
}
if($data['action'] === "add_special_available_local"){
$date = CMSInfoAvailable::getNextSpecialDateBy('local', 6);
CMSInfoAvailable::create([
'type' => 'local',
'wday' => $date->dayOfWeekIso,
'special' => true,
'active' => true,
'from' => '10:00',
'to' => '13:00',
'date' => $date->format('d.m.Y'),
]);
}
if($data['action'] === "add_special_available_phone"){
$date = CMSInfoAvailable::getNextSpecialDateBy('phone', 6);
CMSInfoAvailable::create([
'type' => 'phone',
'wday' => $date->dayOfWeekIso,
'special' => true,
'active' => true,
'from' => '10:00',
'to' => '13:00',
'date' => $date->format('d.m.Y'),
]);
}
\Session()->flash('alert-save', '1');
return redirect(route('cms_content_infos'));
}
@ -85,6 +128,7 @@ class CMSContentInfoController extends Controller
$now = \Carbon::now();
$day_of = $now->dayOfWeekIso;
//days after now
for ($i = $day_of; $i<=7; $i++){
$days[$i] = $days[$i].' <span class="text-muted">('.$now->format("d.m.Y").')</span>';
@ -92,10 +136,12 @@ class CMSContentInfoController extends Controller
}
//days before now
for ($i = 1; $i<$day_of; $i++){
$days[$i] = $days[$i].' <span class="text-muted">('.$now->format("d.m.Y").')</span>';
for ($i = 1; $i<$day_of; $i++) {
$days[$i] = $days[$i] . ' <span class="text-muted">(' . $now->format("d.m.Y") . ')</span>';
$now->modify('+1 day');
}
//add
return $days;
}
@ -106,6 +152,12 @@ class CMSContentInfoController extends Controller
$content->delete();
\Session()->flash('alert-success', __('Content gelöscht'));
}
if($model === 'special_available'){
$content = CMSInfoAvailable::findOrFail($id);
$content->delete();
\Session()->flash('alert-success', __('Content gelöscht'));
}
return redirect(route('cms_content_infos'));
}

View file

@ -86,6 +86,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking query()
* @property-read int|null $arrangements_count
* @property-read int|null $booking_draft_items_count
*/
class Booking extends Model
{

View file

@ -160,6 +160,7 @@ class CMSInfo extends Model
'type' => $type,
]);
}
$content->type = $type;
switch ($content->type){
case 'text':
$content->text = $value;

View file

@ -2,6 +2,8 @@
namespace App\Models;
use App\Services\HTMLHelper;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
@ -27,6 +29,10 @@ use Illuminate\Database\Eloquent\Model;
* @mixin \Eloquent
* @property int $wday
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSInfoAvailable whereWday($value)
* @property int|null $special
* @property string|null $date
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSInfoAvailable whereDate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSInfoAvailable whereSpecial($value)
*/
class CMSInfoAvailable extends Model
{
@ -34,21 +40,78 @@ class CMSInfoAvailable extends Model
protected $table = 'c_m_s_info_availables';
protected $fillable = [
'type', 'wday', 'active', 'from', 'to'
'type', 'wday', 'active', 'from', 'to', 'special', 'date'
];
protected $casts = [
'active' => 'bool',
'special' => 'bool',
];
protected static $days;
public static function getContentBySlug($type, $wday){
return CMSInfoAvailable::whereType($type)->whereWday($wday)->first();
public function getDateAttribute()
{
return isset($this->attributes['date']) ? Carbon::parse($this->attributes['date'])->format('d.m.Y') : '';
}
public static function setContentBySlug($type, $wday, $values){
public function setDateAttribute($value)
{
if (!$value) {
$this->attributes['date'] = null;
} else {
$this->attributes['date'] = Carbon::parse($value)->format('Y-m-d');
}
}
$content = CMSInfoAvailable::whereType($type)->whereWday($wday)->first();
public static function getWeekWithDate($wday = false)
{
if(!self::$days){
self::createWeekWithDate();
}
if($wday){
return self::$days[$wday];
}
return self::$days;
}
public static function createWeekWithDate(){
$days = HTMLHelper::getDeDays();
$now = \Carbon::now();
$day_of = $now->dayOfWeekIso;
//days after now
for ($i = $day_of; $i<=7; $i++){
$days[$i] = [
'name'=>$days[$i],
'date'=>$now->format("d.m.Y"),
];
$now->modify('+1 day');
}
//days before now
for ($i = 1; $i<$day_of; $i++) {
$days[$i] = [
'name'=>$days[$i],
'date'=>$now->format("d.m.Y"),
];
$now->modify('+1 day');
}
//add
self::$days = $days;
}
public static function getContentBySlug($type, $wday, $special = false){
$model = CMSInfoAvailable::whereType($type)->whereWday($wday)->whereSpecial($special)->first();
if($model){
return $model;
}
return new CMSInfoAvailable();
}
public static function setContentBySlug($type, $wday, $values, $special = false){
$content = CMSInfoAvailable::whereType($type)->whereWday($wday)->whereSpecial($special)->first();
if(!$content) {
$content = CMSInfoAvailable::create([
'type' => $type,
@ -59,4 +122,46 @@ class CMSInfoAvailable extends Model
$content->save();
return $content;
}
public static function getSpecialsBy($type){
return CMSInfoAvailable::whereType($type)->whereSpecial(true)->get();
}
public static function getNextSpecialDateBy($type, $wday){
$content = CMSInfoAvailable::whereType($type)->whereWday($wday)->whereSpecial(true)->orderBy('date', 'DESC')->first();
$now = \Carbon::now();
$week = 7;
if($content){
$now = \Carbon::parse($content->date);
}
$day_of = $now->dayOfWeekIso;
$week += ($wday - $day_of);
$now->modify('+'.$week.' days');
return $now;
}
public function fromMinutes (){
if(strpos($this->from, ":")){
$from = explode(":", $this->from);
$hours = isset($from[0]) ? (int) $from[0] : 0;
$minute = isset($from[1]) ? (int) $from[1] : 0;
return $hours * 60 + $minute;
}
return 0;
}
public function toMinutes (){
if(strpos($this->to, ":")){
$to = explode(":", $this->to);
$hours = isset($to[0]) ? (int) $to[0] : 0;
$minute = isset($to[1]) ? (int) $to[1] : 0;
return $hours * 60 + $minute;
}
return 0;
}
}

View file

@ -23,6 +23,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Draft newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Draft newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Draft query()
* @property-read int|null $draft_items_count
* @property-read int|null $travel_program_drafts_count
*/
class Draft extends Model
{

View file

@ -26,6 +26,7 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType query()
* @property int|null $pos
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType wherePos($value)
* @property-read int|null $draft_items_count
*/
class DraftType extends Model
{

View file

@ -100,6 +100,11 @@ use HTMLHelper;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTravelGuideContentId($value)
* @property string|null $title_short
* @property string|null $before_title
* @property-read int|null $children_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBeforeTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTitleShort($value)
*/
class Feedback extends Page
{

View file

@ -58,6 +58,11 @@ use Reliese\Database\Eloquent\Model as Eloquent;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereSingleName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereTypeId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereZipCode($value)
* @property-read int|null $fewo_lodging_images_count
* @property-read int|null $fewo_prices_count
* @property-read int|null $fewo_reservations_count
* @property-read int|null $pages_count
* @property-read int|null $travel_user_booking_fewos_count
*/
class FewoLodging extends Model
{

View file

@ -23,6 +23,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup whereName($value)
* @property-read int|null $fewo_lodging_group_images_count
* @property-read int|null $fewo_lodgings_count
*/
class FewoLodgingGroup extends Model
{

View file

@ -22,6 +22,7 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingType query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingType whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingType whereName($value)
* @property-read int|null $fewo_lodgings_count
*/
class FewoLodgingType extends Model
{

View file

@ -32,6 +32,7 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereOnlyWeekday($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereToDate($value)
* @property-read int|null $fewo_prices_count
*/
class FewoSeason extends Model
{

View file

@ -47,6 +47,7 @@ use Illuminate\Support\Str;
* @property int|null $root_id
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree wherePageId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereRootId($value)
* @property-read int|null $iq_content_tree_nodes_count
*/
class IQContentTree extends Model
{

View file

@ -53,6 +53,8 @@ use Illuminate\Support\Str;
* @mixin \Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_site
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_sites
* @property-read int|null $iq_content_sites_count
* @property-read int|null $iq_content_tree_node_childs_count
*/
class IQContentTreeNode extends Model
{

View file

@ -97,6 +97,10 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTravelGuideContentId($value)
* @property string|null $title_short
* @property string|null $before_title
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBeforeTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTitleShort($value)
*/
class Page extends Model
{

View file

@ -17,6 +17,7 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\ArrangementTemplate newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\ArrangementTemplate newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\ArrangementTemplate query()
* @property-read int|null $arrangements_count
*/
class ArrangementTemplate extends Model
{

View file

@ -26,6 +26,7 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel whereUpdatedAt($value)
* @property-read int|null $travel_user_booking_fewos_count
*/
class TravelBookingFewoChannel extends Model
{

View file

@ -28,6 +28,7 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelClass newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelClass newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelClass query()
* @property-read int|null $travel_program_drafts_count
*/
class TravelClass extends Model
{

View file

@ -57,6 +57,7 @@ use Illuminate\Support\Str;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereTextBefore($value)
* @property array|null $contact_lands
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereContactLands($value)
* @property-read int|null $travel_nationality_requirements_count
*/
class TravelCountry extends Model
{

View file

@ -47,6 +47,7 @@ use Illuminate\Database\Eloquent\Model;
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_sites
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereBoxImageUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereCountryId($value)
* @property-read int|null $iq_content_sites_count
*/
class TravelGuide extends Model
{

View file

@ -97,6 +97,10 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTreeRoot($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereUpdatedAt($value)
* @mixin \Eloquent
* @property string|null $title_short
* @property string|null $before_title
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereBeforeTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTitleShort($value)
*/
class TravelPageGuide extends Model
{

View file

@ -109,6 +109,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram query()
* @property-read int|null $classes_count
* @property-read int|null $travel_program_drafts_count
*/
class TravelProgram extends Model
{

View file

@ -66,6 +66,7 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereTravelNationalityId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereZipcode($value)
* @property-read int|null $travel_user_booking_fewos_count
*/
class TravelUser extends Model
{

View file

@ -82,6 +82,9 @@ class HTMLHelper
public static function getDeDays(){
return self::$de_days;
}
public static function getDeDay($i){
return self::$de_days[$i];
}

View file

@ -72,6 +72,10 @@ use Laravel\Passport\HasApiTokens;
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User wherePermissions($value)
* @property-read int|null $clients_count
* @property-read int|null $notifications_count
* @property-read int|null $tokens_count
* @property-read int|null $user_update_email_count
*/
class User extends Authenticatable
{