Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel eloquent tricks

$post = Post::create($attributes);

if($post->wasRecentlyCreated) {
  // do something
}
Source by laravelproject.com #
 
PREVIOUS NEXT
Tagged: #Laravel #eloquent #tricks
ADD COMMENT
Topic
Name
6+7 =