Created
April 7, 2018 04:57
-
-
Save tisuchi/4fcd86d42c02efdaa50210b17aa8d7a4 to your computer and use it in GitHub Desktop.
How to set laravel custom primary key
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 | |
class Product extends Eloquent { | |
protected $primaryKey = 'product_id'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment