1 | <?php |
||
10 | class UnsplashAsset extends Model |
||
11 | { |
||
12 | protected $fillable = [ |
||
13 | 'unsplash_id', |
||
14 | 'name', |
||
15 | 'author', |
||
16 | 'author_link', |
||
17 | ]; |
||
18 | |||
19 | /** |
||
20 | * The booting method of the model. |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | protected static function boot() |
||
39 | |||
40 | /** |
||
41 | * Get all unsplashables by given model |
||
42 | * @param $model Illuminate\Database\Eloquent\Model |
||
43 | * @return \Illuminate\Database\Eloquent\Relations\MorphToMany |
||
44 | */ |
||
45 | public function assets(Illuminate\Database\Eloquent\Model $model) |
||
49 | |||
50 | /** |
||
51 | * Creates a new instance of the unsplash api client |
||
52 | * @return MarkSitko\LaravelUnsplash\Unsplash |
||
53 | */ |
||
54 | public static function api() |
||
58 | |||
59 | /** |
||
60 | * Returns a complete copyright link for a given data set |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getFullCopyrightLink() |
||
67 | |||
68 | } |
||
69 |