Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel tricks and tips

Article::find($article_id)->increment('read_count');
Article::find($article_id)->increment('read_count', 10); // +10
Product::find($produce_id)->decrement('stock'); // -1
//@sujay
Source by laravel-news.com #
 
PREVIOUS NEXT
Tagged: #laravel #tricks #tips
ADD COMMENT
Topic
Name
3+2 =