Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

Try to use:

Auth::user()->statuses()->find('{$statusId}')->delete();

Hope it works!

PS: If you are starting with Laravel I can recommend you a Laravel step-by-step course: Learn Laravel 5.0 => 5.1

Best wishes.

Last updated 9 years ago.
0

If it's a unique ID, why do you even need the user?

Status::destroy($id);
0

thomastkim said:

If it's a unique ID, why do you even need the user?

Status::destroy($id);

if you have a unique id, you only need to use the destroy method of 'Status' model

0

Sign in to participate in this thread!

Eventy

Your banner here too?

xron89 xron89 Joined 16 Sep 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.