Member Since 6 Years Ago
4,245 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.
Replied to Grouping By Distant Relationships
Hiya in my instance I have bundled products like: Camera body with bag and lens each products in there own right with options I also have split delivery options so products in stock can be sent immediately and out of stock products can follow on another service or digital products emailed.
if I were to write the sql it would look like this:
SELECT * FROM orders_products INNER JOIN orders_products_options ON orders_products.id = orders_products_options.order_product_id INNER JOIN orders_products_delivery ON orders_products_options.id = orders_products_delivery.order_product_option_id WHERE orders_products.order_id = $order->id ORDER BY orders_products_delivery.delivery_option
Started a new Conversation Grouping By Distant Relationships
I am trying to group by a distant relationship:
an order hasMany products a Product hasMany Options an Option hasOne DeliveryMethod (and all options for one product have the same DeliveryMethod)
so when looping over all $order->products :
@foreach($order->products as $product)
I would like them grouped or ordered by the DeliveryMethod I am guessing the only way I could do it is to loop over the collection in my controller and build a new collection in the order I want?
Replied to Scheduling Commands From The Database
Ah so I just schedule it once for say every 15 minutes rather then trying to set the schedule and pass the feed ID from the database! Brilliant thank you.
Started a new Conversation Scheduling Commands From The Database
Is it possible to schedule commands from a model lets say I have a feeds table which contains a list of feeds and the frequency they should be downloaded and parsed I want the kernel class to hit the database check if a feed is due to be downloaded pass its id perhaps to the command which can in turn call the download and queue the parsing of the file via an event listener once the download is completed.
The only part I can't seem to get my head around is scheduling the command in the kernel class and passing the model ID to the the command.
Any help would be greatly appreciated.
solved with queues
Started a new Conversation Slow Events Can They Be - Asynchronous Events ?
Hiya Lara Peeps I am writing an orders script which fires several events once the data is stored I pass the order object to the events which then send them on to the listeners and they each do their thing one sends an email another sorts stock or places an order for the item with the supplier if we have no stock using a webservice another updates stock on eBay if the item is listed again using an api and lastly the order is sent to an accounting api.
The problem is this seems to take an age to complete - I thought once the events were fired the method didn't have to wait for them to complete before carrying on ?
the end result is to redirect to the order - is there anyway to make the events to fire and the listeners to run independently in the background while the store method just saves the data to the db and redirects to the show screen?