IDE Helper added
This commit is contained in:
parent
7fd04ce100
commit
3f1bca4168
15 changed files with 21231 additions and 22 deletions
|
@ -15,6 +15,45 @@ use League\CommonMark\Environment;
|
|||
use Spatie\CommonMarkHighlighter\FencedCodeRenderer;
|
||||
use Spatie\CommonMarkHighlighter\IndentedCodeRenderer;
|
||||
|
||||
/**
|
||||
* App\Models\Article
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $titleurl
|
||||
* @property string|null $url
|
||||
* @property string $title
|
||||
* @property string $main
|
||||
* @property int $published
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property-read string $html
|
||||
* @property-read string $human_time
|
||||
* @property-read string $link
|
||||
* @property-read string $pubdate
|
||||
* @property-read string $tooltip_time
|
||||
* @property-read string $w3c_time
|
||||
* @method static Builder|\App\Models\Article date($year = null, $month = null)
|
||||
* @method static Builder|\App\Models\Article findSimilarSlugs($attribute, $config, $slug)
|
||||
* @method static bool|null forceDelete()
|
||||
* @method static Builder|\App\Models\Article newModelQuery()
|
||||
* @method static Builder|\App\Models\Article newQuery()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Article onlyTrashed()
|
||||
* @method static Builder|\App\Models\Article query()
|
||||
* @method static bool|null restore()
|
||||
* @method static Builder|\App\Models\Article whereCreatedAt($value)
|
||||
* @method static Builder|\App\Models\Article whereDeletedAt($value)
|
||||
* @method static Builder|\App\Models\Article whereId($value)
|
||||
* @method static Builder|\App\Models\Article whereMain($value)
|
||||
* @method static Builder|\App\Models\Article wherePublished($value)
|
||||
* @method static Builder|\App\Models\Article whereTitle($value)
|
||||
* @method static Builder|\App\Models\Article whereTitleurl($value)
|
||||
* @method static Builder|\App\Models\Article whereUpdatedAt($value)
|
||||
* @method static Builder|\App\Models\Article whereUrl($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Article withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Article withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Article extends Model
|
||||
{
|
||||
use Sluggable;
|
||||
|
@ -123,9 +162,12 @@ class Article extends Model
|
|||
/**
|
||||
* Scope a query to only include articles from a particular year/month.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
* @param Builder $query
|
||||
* @param int|null $year
|
||||
* @param int|null $month
|
||||
* @return Builder
|
||||
*/
|
||||
public function scopeDate($query, int $year = null, int $month = null): Builder
|
||||
public function scopeDate(Builder $query, int $year = null, int $month = null): Builder
|
||||
{
|
||||
if ($year == null) {
|
||||
return $query;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue