除了那些有音频或视频Laravel Eloquent之外的所有问题

Hi there can someone please help me is it possible to take only the questions that dont have audio or video included to ignore those questions that have audio or video :

This is my controller a part of my controller:

 public function generateTestPdf(Request $request){

        $test_id   = $request['test_id'];

        $test               = Test::where('id', $test_id)->first();
        $test_info          = (new TestInfoController)->testInfo($test_id);

        $test_questions     = (new TestQuestionsController)->questionwithanswers($test_id, $randomorder = 1);

.
.
.
and so on..

From this $test_questions this is my result when I die dump I have two questions one with audio included and the other no audio, I want to be able the question with audio to ignore, to not take that . How can I put a message and say audio and video not included and to not include them? enter image description here

enter image description here

Modify your questionwithanswers method and add the following to the query builder:

->whereNull('question_audio')
->whereNull('question_video')

https://laravel.com/docs/5.6/queries#where-clauses