Member Since 2 Years Ago
3,730 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Thanks @shez1983 ! :)
Started a new Conversation Stripe - Charge User Whenever An Event Is Triggered
I have a question about stripe and single charges. Is it possible to store a user's credit card once and then charge that card multiple times later, whenever a particular event is triggered. Is there a simple way to do this in with Cashier?
The Laravel documentation for Cashier on Payment Methods for Single Charges says:
"Due to Stripe limitations, you may not use the stored default payment method of a customer for single charges. You must allow the customer to enter their payment method details using the Stripe.js library."
But the documentation for Cashier on Single Charges then says:
"If you would like to make a "one off" charge against a subscribed customer's payment method, you may use the charge method on a billable model instance. You'll need to provide a payment method identifier as the second argument:"
// Stripe Accepts Charges In Cents... $stripeCharge = $user->charge(100, $paymentMethod);
Reading the stripe documentation, it seems that there is no problem to charge a user later when they are offline, using their saved payment method:
"The Setup Intents API lets you save a customer’s card without an initial payment. This is helpful if you want to onboard customers now, set them up for payments, and charge them in the future—when they’re offline.
Use this integration to set up recurring payments or to create one-time payments with a final amount determined later, often after the customer receives your service."
I'm confused :( ... should I use Cashier and create a subscription for the user that does not charge a subscription? Then make one-off charges using the charge method when needed?
Any help would be very much appreciated!
Started a new Conversation General Advice On Date-based Events And Task Scheduling
I'm working on an app that allows users to create reminders for items on their to-do list.
What I'm trying to achieve is a form that allows the user to select a date and time by when they intend to complete an item on their to-do list. I would like the app to then automatically send an email reminder a few hours/days before the deadline if the user hasn't checked off the item as completed.
I'm not sure how to go about triggering the email reminders. I haven't worked with dates, events or task scheduling in Laravel yet.
Some of the ways I thought of implementing this:
(1) Using events. Don't know much yet about events and listeners.
(2) Scheduling a task - say a search every few hours in the database of upcoming deadlines and sending a notification reminder to those users. This seems like it might be harder to implement for me as I don't have any experience on chron jobs yet and haven't deployed many apps either. Also, it seems that by using this approach, the users wouldn't get the reminder email at a specific time before each deadline.
(3) Delayed dispatching - immediately sending the notification job to the queue with a delayed dispatched of X amount of time before the deadline, then cancelling the notification somehow at dispatch if the item has been checked off as completed.
I was just looking for some general advice and maybe some code if you had to solve this specific problem in the past. I'm not looking for the most efficient solution for the time being, but just what would be quite easy to get up and running.
Thanks for any ideas.