Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.3/develop' of git://github.com/pyrocms/pyrocms into 2…
….3/develop
- Loading branch information
Showing
22 changed files
with
746 additions
and
246 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 was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
system/cms/modules/domains/src/Pyro/Module/Domains/Model/Domain.php
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,44 @@ | ||
<?php namespace Pyro\Module\Domains\Model; | ||
|
||
/** | ||
* Domain model | ||
* | ||
* @author PyroCMS Dev Team | ||
* @package PyroCMS\Core\Modules\Redirects\Models | ||
*/ | ||
class Domain extends \Illuminate\Database\Eloquent\Model | ||
{ | ||
/** | ||
* Define the table name | ||
* | ||
* @var string | ||
*/ | ||
protected $table = 'domains'; | ||
|
||
/** | ||
* Disable updated_at and created_at on table | ||
* | ||
* @var boolean | ||
*/ | ||
public $timestamps = false; | ||
|
||
public function site() | ||
{ | ||
return $this->belongsTo('site'); | ||
} | ||
|
||
/** | ||
* Find by domain with ID | ||
* | ||
* @param string $domain The domain | ||
* @param int $id of the domain | ||
* | ||
* @return void | ||
*/ | ||
public static function findByDomainAndId($domain, $id = 0) | ||
{ | ||
return static::where('id', '!=', $id) | ||
->where('domain', '=', $domain)->first(); | ||
} | ||
|
||
} |
Oops, something went wrong.