Skip to content

Instantly share code, notes, and snippets.

@AhmadWaleed
Created May 26, 2019 07:48
Show Gist options
  • Save AhmadWaleed/5cf5d030f97b8eae0568ae61a47bd7b4 to your computer and use it in GitHub Desktop.
Save AhmadWaleed/5cf5d030f97b8eae0568ae61a47bd7b4 to your computer and use it in GitHub Desktop.
// creating post
$post = Post::create($attributes);

// publish post
$post->published_at = now();
$post->save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment