Ekapp/skolehjem/app/ResourceExtension.php

23 lines
608 B
PHP
Raw Normal View History

2020-06-09 08:45:16 +00:00
<?php
2020-07-27 08:43:22 +00:00
//The Model to a certain Controller, should contain a class with Controller name to which it belongs.
// Allows needed strings to passed onto the database. if there is none. class should appear empty.
//Reference to where the file belongs.
2020-06-09 08:45:16 +00:00
namespace App;
2020-07-27 08:43:22 +00:00
//allows the use of Model library
2020-06-09 08:45:16 +00:00
use Illuminate\Database\Eloquent\Model;
//Class of which should extend Model Library
2020-06-09 08:45:16 +00:00
class ResourceExtension extends Model
{
protected $fillable = [
2020-08-12 08:44:54 +00:00
'extension', 'description', 'resource_category_id'
];
public function resources() {
return $this->hasMany("App\Resource");
}
2020-06-09 08:45:16 +00:00
}