Created
July 10, 2020 08:01
-
-
Save vineeth030/6202d4b17178564ee5d7cde021e0f7ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Handle the post "creating" event. | |
* | |
* @param \App\Post $post | |
* @return void | |
*/ | |
public function creating(Post $post) | |
{ | |
$post->author_id = Auth::user()->id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment