asadbinamer

Experience

660

0 Best Reply Awards

  • Member Since 2 Weeks Ago
  • 3 Lessons Completed
  • 0 Favorites

19th March, 2017

asadbinamer left a reply on Passing Array Value In Db • 1 week ago

@ctroms yes it is resolved ......bundle of thanks :)

asadbinamer left a reply on Passing Array Value In Db • 1 week ago

@ctroms how to call them in controller means how to request them ??

asadbinamer left a reply on How To Pass Array Values In Db • 1 week ago

this is how i am passing $question variable

public function store(Request $request ,Question $question){

Schema::create('add_questions', function (Blueprint $table) { $table->increments('id'); $table->integer('question_id'); $table->string('question'); $table->string('answer'); $table->string('correct')->nullable(); $table->timestamps();

asadbinamer left a reply on Passing Array Value In Db • 1 week ago

it is there but not shown in code

asadbinamer left a reply on How To Pass Array Values In Db • 1 week ago

AddQuestion::create([

           'question'=>request('question'),
             'answer'=>request('answer'),
             'question_id'=>$question->id

asadbinamer left a reply on How To Pass Array Values In Db • 1 week ago

@ctroms

this is my form code

{{csrf_field()}}
<div class="container">
      <div class="row">
    <div class="col-sm-4">
     <label for="answer">Question</label>

  
         <input class="form-control" name="question[]" id="answer" value="" type="text" placeholder="Enter Answer" />
   </div>
         
         <div class="col-sm-4">
         <label for="answer">Answer</label>

        
         <input class="form-control" name="answer[]" id="answer" value="" type="text" placeholder="Enter Answer" />
         </div>
         <div class="col-sm-4">
         </br></br>
         
          <p><a href="#" class='remove'>Delete Question</a></p>
          </div>
          </div>
        </div>
        

Add Question

asadbinamer started a new conversation How To Pass Array Values In Db • 1 week ago

Please help me I am getting this error

Argument 1 passed to Illuminate\Database\Grammar::parameterize() must be of the type array, integer given, called in D:\xampp\htdocs\assignment\vendor\laravel\framework\src\Illuminate\Database\Query\Grammars\Grammar.php on line 681 and defined

asadbinamer left a reply on Passing Array Value In Db • 1 week ago

My controller code

AddQuestion::create([

             'question'=>request('question'),
             'answer'=>request('answer'),
             'question_id'=>$question->id
          
        ]);

asadbinamer left a reply on Passing Array Value In Db • 1 week ago

My form code

{{csrf_field()}}
<div class="container">
      <div class="row">
    <div class="col-sm-4">
     <label for="answer">Question</label>

  
         <input class="form-control" name="question[]" id="answer" value="" type="text" placeholder="Enter Answer" />
   </div>
         
         <div class="col-sm-4">
         <label for="answer">Answer</label>

        
         <input class="form-control" name="answer[]" id="answer" value="" type="text" placeholder="Enter Answer" />
         </div>
         <div class="col-sm-4">
         </br></br>
         
          <p><a href="#" class='remove'>Delete Question</a></p>
          </div>
          </div>
        </div>
        

Add Question

asadbinamer started a new conversation Passing Array Value In Db • 1 week ago

I am storing form values in db but the values are in array and it is not storing the data and giving me the following error

ErrorException in Grammar.php line 135: Argument 1 passed to Illuminate\Database\Grammar::parameterize() must be of the type array, integer given, called in D:\xampp\htdocs\assignment\vendor\laravel\framework\src\Illuminate\Database\Query\Grammars\Grammar.php on line 681 and defined

15th March, 2017

asadbinamer left a reply on Upload File In Laravel 5.4 • 1 week ago

@silverxjohn I have the folder but still no response.........what type of permission ??

asadbinamer left a reply on Upload File In Laravel 5.4 • 1 week ago

upload.blade.php

class UploadsController extends Controller { public function show (){ return view ('blog.upload'); }

public function upload(){
    if(Input::hasFile('file')){
        echo 'Uploaded';
        $file=Input::file('file');
        $file->move('uploads' , $file->getClientOriginalName());
        echo '<img src="uploads/' . $file->getClientOriginalName().'"/>';
        
        
    }

    else {

        echo 'Not Uploaded';
    }
}

}

asadbinamer started a new conversation Upload File In Laravel 5.4 • 1 week ago

I am uploading the file and it is showing the file also but not storing the file in folder here is my code......Please help me

routes.php

Route::get('/view' , [email protected]'); Route::post('/upload' , [email protected]');

upload.blade.php

@extends('blog.master') @section('content')

{{csrf_field()}} @endsection

uploadscontroller.php

9th March, 2017

asadbinamer left a reply on Mail Is Not Sending Through Laravel • 2 weeks ago

@djay I have tried it but again the connection timeout ......

asadbinamer left a reply on Mail Is Not Sending Through Laravel • 2 weeks ago

If I change port to 465 the this error occurs

Connection to tcp://smtp.gmail.com:465 Timed Out

asadbinamer left a reply on Mail Is Not Sending Through Laravel • 2 weeks ago

if I try the ssl encryption then this error occurs

ErrorException in StreamBuffer.php line 94: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

asadbinamer left a reply on Mail Is Not Sending Through Laravel • 2 weeks ago

the config/mail.php is using the same variables.....no issue with that....

asadbinamer left a reply on Mail Is Not Sending Through Laravel • 2 weeks ago

yes but it still gives the same error......I am not understanding the STARTTLS command.....what does that mean ??

asadbinamer left a reply on Mail Is Not Sending Through Laravel • 2 weeks ago

These are all correct

MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=mygmail.com MAIL_PASSWORD=mypassword MAIL_ENCRYPTION=null

These are my settings

Can you suggest please ??

asadbinamer started a new conversation Mail Is Not Sending Through Laravel • 2 weeks ago

This is my error

Swift_TransportException in AbstractSmtpTransport.php line 383: Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first.gh9sm2847345pbc.gsmtp

Can anyone help me ??

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.