-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Model for database source. Added Template::getOriginal method f…
…or nova-flexible-content (HasMediaLibrary issue) compatibility. References #42
- Loading branch information
1 parent
c7af390
commit 7d0d15d
Showing
6 changed files
with
122 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Whitecube\NovaPage\Sources; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class StaticPage extends Model | ||
{ | ||
/** | ||
* The table associated with the model. | ||
* | ||
* @var string | ||
*/ | ||
protected $table; | ||
|
||
/** | ||
* The attributes that are mass assignable. | ||
* | ||
* @var array | ||
*/ | ||
protected $fillable = ['type', 'name', 'title', 'attributes']; | ||
|
||
/** | ||
* Create a new Eloquent model instance. | ||
* | ||
* @param array $attributes | ||
* @return void | ||
*/ | ||
public function __construct(array $attributes = []) | ||
{ | ||
$this->table = config('novapage.sources.database.table_name'); | ||
|
||
parent::__construct($attributes); | ||
} | ||
} |
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