Skip to content

Instantly share code, notes, and snippets.

@DarkGhostHunter
Created March 26, 2019 19:54
Show Gist options
  • Select an option

  • Save DarkGhostHunter/ff24a1c1775df8a12aa388cfcff6b8d0 to your computer and use it in GitHub Desktop.

Select an option

Save DarkGhostHunter/ff24a1c1775df8a12aa388cfcff6b8d0 to your computer and use it in GitHub Desktop.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Podcast extends Model
{
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'id'
];
/**
* Get the route key for the model.
*
* @return string
*/
public function getRouteKeyName()
{
return 'uuid';
}
// ... The rest of the Model code.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment