Я хочу получить post_id
из данных объекта.Как мне получить это?
Вот мой код от моего контроллера:
class NotificationController extends Controller
{
/**
* Show All Notifications
*
* @return \Illuminate\Http\JsonResponse
*/
public function index()
{
$user = JWTAuth::parseToken()->toUser();
// where('data', 'like', '%"post_id": 35%')
$notification = $user->notifications->where('type', 'App\Notifications\LikePost');
return response()->json(['notification'=> $notification], 200);
}
}