How to disable public holidays on data picker with laravel 5.7 - laravel

I'm new to laravel. I want to make public holidays disabled in an appointment schedule application such that customers will not be allowed to book for an appointment during such period.
For example, if the date is Thursday, December 26, 2019, it should return: today is boxing day, you can't book an appointment today please schedule an appointment for another day. Please, how can I achieve that in laravel?

If all you need is to validate the date you receive from your form in your laravel backend server, there are several libraries out there you can try. Take a look at https://github.com/checkdomain/Holiday

Related

How to activate email notification on visa expiry date on odoo

I'm using the version 11 and i want to know how can i activate the email reminder on visa expiry date. I searched on the net but i found a solution only for an older version and it wasn't clear. Any idea for help please ?
Use this module to inspire you, you can apply the same principal,
Quotation Expiry Reminder odoo 11
this module send mails to the sales person based on the reminder settings.
I hope my answer will be helpful

Laravel Cashier Stripe Trial creates new subscriptions, allows exploit

I am using Laravel Cashier to add stripe payments (subscriptions) for the premium version of my web app. Users are offered a 5-day free trial (card in advance).
Now what happens is, I create a subscription using:
$user->newSubscription('premium','monthly')->trialDays(5)->create($stripeToken,['email' => $user->email], "")
Works really well, but let's say the user cancels his subscription within the trial period.. He will be on the 'grace' period, let's say for 4 more days..
When these days are passed, user will lose account benefits, as the trial will expire and subscription is cancelled.
But, after that, if the user wants to subscribe again, since $subscription->resume() is only available during the grace period, I would have to create a subscription using $user->newSubscription, generating a new subscription on the table and a new trial period.. allowing them to cancel again, wait 5 days, create another one and repeat this getting free trial days forever..
Is there a way to "resume" an existing subscription when it is cancelled and grace period is over?

How to change modified On/ Created on date of all email activities in MSCRM using SQL

We have MS CRM 2013 on-premise.
We had to update email id of all our previous email activities and in doing so all the activities have got updated with the new modified on and sent date.
Now the problem is whenever we see the activities on first page it is by default sorted by modified on date.
Is there any script(SQL) with which we can change the modified on/ Sent date of all the email activities.
Have a look here, you might find a solution to your problem:
http://www.magnetismsolutions.com/blog/vincentzhong/2012/08/15/how_to_modify_the_created_on_value_of_dynamics_crm_2011_part_1
I would also say, that modifying created on date using SQL is possible, but unsupported and I would really discourage you from doing that.

Unable to refresh updated appointments in Service Calendar

I'm unable to refresh the Service Calendar view when I'm updating fields on an appointment record.
In this first screenshot I've created a new appointment and my Users are attached to the following fields:
Organizer: Pu Bjerre
Required: Konrad Viltersten and Annie Kruse
The created appointment gives the following view in the Service Calendar.
Now I want to update my appointment by following changes.
Rescheduled the appointment time by one hour
Removed Annie Kruse from the Required field
After I've updated my appointment and refreshed the Service Calendar, this is the view the service calender shows:
It seems that my service calender is only viewing the updates I'm adding, not the updates I'm removing. The only way I'm able to remove Annie Kruse is by closing the browser and log in again into the organization.
No idea what that depends on. Also, I'm not sure how to handle it. Is it by design? Or is it a know (mis)behavior? The usual googling led to nowhere.

Running an action in time intervals

I am developing an asp.net mvc application in which deliver some services to my customers. Every customer has a profile and in that profile there's is a field with customer's birthday date. I want my application to automatically be notified about my customer birthday and by ruining some action, sends him/her 'Happy Birthday' Message.
How could it be possible ?
Generally you'd have a database scheduled task to scan your users' profiles (users table) for anyone that has a birthday in the day the scanning process is running.
Select the users that match the query and use a custom class/method to send them a birthday message using .NET mail capabilities.
For more ideas, take a look at: Send emails in background job/scheduled task in asp.net mvc 3

Resources