当我想详细查看我的物品Laravel时,连接受到保护
我在Laravel 9上,我的数据库和我的元素要详细看到,但是当我想看到它时,它向我展示了这一点(当我想显示所有元素时,我会看到它)
控制器
public function show(Tickets $tickets)
{
var_dump($tickets);
return view('tickets.show', ['ticket' => $tickets]);
}
模型
class Tickets extends Model
{
use HasFactory, SoftDeletes;
protected $fillable = [
'title',
'description',
'status',
'priority',
'type',
'assigned_to',
];
}
路由
Route::get('oauth', [gCalendarController::class, 'oauth']);
I am on laravel 9, I have my database with my element that I want to see in detail but it shows me this when I want to see it, (I see it when I want to display all the elements)
Controller
public function show(Tickets $tickets)
{
var_dump($tickets);
return view('tickets.show', ['ticket' => $tickets]);
}
Models
class Tickets extends Model
{
use HasFactory, SoftDeletes;
protected $fillable = [
'title',
'description',
'status',
'priority',
'type',
'assigned_to',
];
}
Routes
Route::get('oauth', [gCalendarController::class, 'oauth']);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您返回了@lagbox评论的门票模型的对象。
如果您想在访问show()函数时获得所有机票,则需要这样做:
希望这是有帮助的。
I think you returned the object of Tickets Model like @lagbox commented.
If you want to get all ticket when accessing to show() function, you need to do like this:
Hope this help.