for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Qsnh/meedu.
*
* (c) XiaoTeng <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FaqArticle extends Model
{
protected $table = 'faq_articles';
protected $fillable = [
'category_id', 'admin_id', 'title', 'content',
];
protected $appends = [
'edit_url', 'destroy_url',
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
public function category()
return $this->belongsTo(FaqCategory::class, 'category_id');
}
* @return string
public function getEditUrlAttribute()
return route('backend.faq.article.edit', $this);
$this
App\Models\FaqArticle
array
$parameters
route()
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
return route('backend.faq.article.edit', /** @scrutinizer ignore-type */ $this);
public function getDestroyUrlAttribute()
return route('backend.faq.article.destroy', $this);
return route('backend.faq.article.destroy', /** @scrutinizer ignore-type */ $this);