gaan10

Experience

2,010

0 Best Reply Awards

  • Member Since 1 Year Ago
  • 8 Lessons Completed
  • 0 Favorites

15th June, 2018

gaan10 left a reply on Pagination For The View Is Not Working In Laravel5.3 • 1 week ago

I think i should pass referredProcedureBookings to links. {{ referredProcedureBookings->links() }}

gaan10 started a new conversation Pagination For The View Is Not Working In Laravel5.3 • 1 week ago

I am trying to use pagination for my view pages but getting error as : Call to a member function links() on array

Limiting to display records using paginate in controller is fine,but issue is when passing to the view. Controller code is:

$referredProcedureBookings = Gateway::procedurebooking()->getReferredProcedureBooking()->paginate(5);
            $new_records = [];
            foreach ($referredProcedureBookings as $referredProcedureBooking) 
            {
                $records['ProcedureId'] = $referredProcedureBooking->id;
                $records['ProcedureName'] = $referredProcedureBooking->procedure_name;
        $new_records[] = $records;    
            }
            return view('procedurebookings',compact('new_records');
In my view its like this:
@foreach($new_records as $new_recordss)
<td><div class="col-md-2"><h5 class="panel-body">{{ $new_recordss['Name'] }}</h5></div></td>
      
      <td><div class="col-md-2 col-md-pull-6"><h5 class="panel-body">{{ $new_recordss['Age'] }}</h5></div></td>
@endforeach 
{{ $new_records->links() }}

error i am getting is :Call to a member function links() on array Even if i use :{{ $new_records[links()] }} then i get :Call to undefined function links() how should i use the links method?

12th June, 2018

gaan10 left a reply on Display The Image Stored In Storage Folder By Clicking The Link From The Blade File. • 1 week ago

This fixed it. <a href="">{{ $data->document_8 }}

gaan10 started a new conversation Display The Image Stored In Storage Folder By Clicking The Link From The Blade File. • 1 week ago

I have an image inside my storage folder which i want to display in my view file such that when the name of the file is displayed and clicked it opens the image. But i am unable to do so,my code is :

<a href="<?php  asset("storage/documents/$mobile/uploads/$data->document_8")?>"></a>

How to fix this

9th June, 2018

gaan10 started a new conversation 0 Down Vote Favorite I Have A Foreach Loop That I Am Using To Show The Dataset,but I Want To Show Specific Dataset Under A Single Button So That Button Click Leads To Showing That Particular Data • 2 weeks ago

My view file is this :

@foreach($new_records as $new_recordss)

{{ $new_recordss['Mob'] }} show/hide{{ $new_recordss['PreferredDate'] }}{{ $new_recordss['PreferredCity'] }}{{ $new_recordss['BookingId'] }}{{ $new_recordss['Documents'] }}{{ $new_recordss['Age'] }}{{ $new_recordss['Gender'] }} @endforeach

Jquery code is:

$(document).ready(function() { $(".numero_class").hide(); $(".shownum_class").click(function(){ $(this).next(".numero_class").toggle(); }); });

Currently this is not working .Plz help

5th June, 2018

gaan10 left a reply on Not Able To Use Curl->post To Send Sms Foreach Mobile Numbers. • 2 weeks ago

Thanks guys its working now @Cronix and @Snapey

gaan10 left a reply on Using Foreach,i Am Trying To Send Sms To Multiple Nos But Able To Sent To Only One. • 2 weeks ago

This the dump postdata:

array:5 [ "authkey" => "115544AE7P5IoXv5757e408" "message" => "Message" "sender" => "EZHLTH" "route" => "4" "mobiles" => "9611321782" ] array:5 [ "authkey" => "115544AE7P5IoXv5757e408" "message" => "Message" "sender" => "EZHLTH" "route" => "4" "mobiles" => "9066578876" ]

How to use curl now?Any help plz. Without curl all works .

gaan10 left a reply on Using Foreach,i Am Trying To Send Sms To Multiple Nos But Able To Sent To Only One. • 2 weeks ago

@Snapey as i already said without curl it works.But if i don't use curl then how to send the sms

gaan10 left a reply on Not Able To Use Curl->post To Send Sms Foreach Mobile Numbers. • 2 weeks ago

@Cronix because the issue was with curl and post . If i remove curl and post it iterates good.

gaan10 left a reply on Not Able To Use Curl->post To Send Sms Foreach Mobile Numbers. • 2 weeks ago

even if i remove return then also same

gaan10 started a new conversation Not Able To Use Curl->post To Send Sms Foreach Mobile Numbers. • 2 weeks ago

I need to send sms to mobile nos. and while doing that i iterate over an array and send .But when i use curl->post i am not able to iterate .It sends only one time.what can be the issue.

foreach($new_tokens as $new_tokenss)

      {
    
       foreach($new_tokenss as $new_token)
    
            {
        
$message = "Message";
        $message_encoded = urlencode($message);
        $postData = array(
            'authkey' => \Config::get('procedures.msg91.authKey'),
            'mobiles' => $new_token->mob,
            'message' => $message_encoded,
            'sender' => \Config::get('procedures.msg91.senderId'),
            'route' => \Config::get('procedures.msg91.route')
        );
      
        $curl = new \anlutro\cURL\cURL;
        $curl->post(\Config::get('procedures.msg91.api_url'), $postData);
        return 'New emergency patient';
    }
          
        }

gaan10 left a reply on Using Foreach,i Am Trying To Send Sms To Multiple Nos But Able To Sent To Only One. • 2 weeks ago

Also i have seen that without curl and post it iterates,only when i give curl and post it iterates 1 time. Any solutions plz

gaan10 left a reply on Using Foreach,i Am Trying To Send Sms To Multiple Nos But Able To Sent To Only One. • 2 weeks ago

ok this is what new_tokens looks like:

array:1 [ 0 => Collection {#262 #items: array:5 [ 0 => {#252 +"id": 2 +"user_id": 90 +"aadhar_no": "234356768767" +"district_counsellor_id": "EZDCI0008" +"mob": "9611321782" +"address_id": 52 +"token": "llllololol" +"created_at": "2018-04-23 04:17:14" +"updated_at": "2018-04-24 04:33:51" +"district": "mumbai" } 1 => {#253 +"id": 1 +"user_id": 92 +"aadhar_no": "123445676789" +"district_counsellor_id": "EZDCI0009" +"mob": "9066578876" +"address_id": 50 +"token": "lopollopoolooppo" +"created_at": "2018-04-23 09:23:23" +"updated_at": "2018-04-23 20:00:00" +"district": "bangalore" } .........like this json

4th June, 2018

gaan10 left a reply on Using Foreach,i Am Trying To Send Sms To Multiple Nos But Able To Sent To Only One. • 2 weeks ago

No its not working. tried doing $record []=$new_token->mob and count the $records later, shows all the mobile nos.But when i put the msg body it shows only one time. Any pointers.

gaan10 left a reply on Using Foreach,i Am Trying To Send Sms To Multiple Nos But Able To Sent To Only One. • 2 weeks ago

sorry,my bad,i updated it. Actually $new_tokens is some token.I am taking the mobile corresponding to that tokens. Is it ok now?

gaan10 started a new conversation Using Foreach,i Am Trying To Send Sms To Multiple Nos But Able To Sent To Only One. • 2 weeks ago

I am using foreach to iterate over an array and send sms to each nos,but not able to do so.It send to only a single. Mt code is : foreach($new_tokens as $new_tokenss) { foreach($new_tokenss as $new_token) { $message = "Message"; $message_encoded = urlencode($message); $postData = array( 'authkey' => \Config::get('procedures.msg91.authKey'), 'mobiles' => $new_token->mob, 'message' => $message_encoded, 'sender' => \Config::get('procedures.msg91.senderId'), 'route' => \Config::get('procedures.msg91.route') );

            $curl = new \anlutro\cURL\cURL;
            $curl->post(\Config::get('procedures.msg91.api_url'), $postData);
            return 'New emergency patient';
            
        }
              
            }

The 2nd foreach should send to each new_token->mob .but it sends to one and then stops.what am doing wrong?

31st May, 2018

gaan10 started a new conversation I Am Trying To Pass Multiple Query For Execution For Which I Don't Want Data From 1st Query To Execute If The Last Query Is Having Issues.How To Achieve This. • 3 weeks ago

$user = Gateway::user()->storeDoctorUser(\Input::all(), 'doctor'); $address = Gateway::address()->storeDoctorAddress(\Input::all(), $user->id); $doctors = Gateway::doctor()->storeDoctorData(\Input::all(), $user->id,$address->id);

As stated above how to solve this issue.If somehow the doctor query is failing then also user and address are working ,which should not happen .If the last one fails all should fail.

25th May, 2018

gaan10 started a new conversation Getting Error Using The Default Auth In Laravel 5 For Registering And Login Users. • 4 weeks ago

Hello , I am trying to implement registration and login using the auth scaffolding in laravel.I am using a different users table called adminpanelusers instead of the users table. Now i am getting this error: (1/1) ErrorException Argument 1 passed to Illuminate\Auth\SessionGuard::login() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\User given, called in C:\xampp\htdocs\procedures\vendor\laravel\framework\src\Illuminate\Foundation\Auth\RegistersUsers.php on line 35 and defined

in SessionGuard.php (line 408)

Is it coming because of my using different user model .If yes how to resolve it. Thanks in advance.

14th April, 2018

gaan10 left a reply on Laravel Sentinel Authentication Method Is Not Working • 2 months ago

the user is registered and activated.Even though the error is coming. so,if i dd($authenticate) it returns false

13th April, 2018

gaan10 left a reply on Laravel Sentinel Authentication Method Is Not Working • 2 months ago

ok solved.thanks

gaan10 left a reply on Laravel Sentinel Authentication Method Is Not Working • 2 months ago

ok i tried to register and activate the user. but it says No [login] credential was passed.

gaan10 left a reply on Laravel Sentinel Authentication Method Is Not Working • 2 months ago

u mean the username in the database? The username is in the database.I need the authenticate to check and display logged in as the user is already there.

gaan10 started a new conversation Laravel Sentinel Authentication Method Is Not Working • 2 months ago

I am trying to authenticate my usernane and password via sentinel authentication method in laravel.But the authentication is not working as i am not getting the logged_in message asthe user and password are both in the db .Plz let me know where i am getting wrong.Below is my code.Thanks.

        $new_inputs['username'] = $inputs['mob'];
        $new_inputs['password'] = $inputs['password'];

        $credentials = Sentinel::authenticate($new_inputs);

        if ($credentials) {

return Lang::get('messages.info.loggedIn'); } else { return Lang::get('messages.info.invalid_user'); }

13th October, 2017

gaan10 started a new conversation Delay For My Pdf Download In Laravel Using Barryvdh/laravel-dompdf • 8 months ago

I am using barryvdh/laravel-dompdf for my pdf download in laravel.The download is ok but it takes nearly2-3 mins for the download.What could be the issue?

11th October, 2017

gaan10 started a new conversation I Want To Calculate The Total Total Bytes For Each Server.But Having Problem Dispalying It In My View.My Table Name Is Servers And Coumn Name Are Servers_name And Bytes. • 8 months ago

My controller code is:

$servers = DB::table("servers")->groupBy('server_name')->select('server_name')->sum('bytes');

My view is :

@foreach ($servers as $key => $value)

    <td>{{ $value->$bytes }}</td> 
 
  </tr>
 
   @endforeach

6th October, 2017

gaan10 left a reply on I Am Trying To Pass 2 Different Columns From My Sql Table To My View ,so That I Can Show Them. My Controller Is • 8 months ago

yes i have the column name in users table. Thanks

gaan10 left a reply on I Am Trying To Pass 2 Different Columns From My Sql Table To My View ,so That I Can Show Them. My Controller Is • 8 months ago

My controller now: $interface = DB::table("users")->distinct()->get(['name']); $inter = DB::table("users")->distinct()->get(['email']); $users = User::all();

view()->share('users',compact('interface','inter','users'));

My view now: @foreach ($users as $key => $value) {{ $value->name }} {{ $value->email }}

Still getting error Undefined property $name

gaan10 left a reply on I Am Trying To Pass 2 Different Columns From My Sql Table To My View ,so That I Can Show Them. My Controller Is • 8 months ago

actually distinct was just an example .there will be others.actually i want to pass multiple sql queries.I am not sure how to do that

gaan10 left a reply on I Am Trying To Pass 2 Different Columns From My Sql Table To My View ,so That I Can Show Them. My Controller Is • 8 months ago

I have to pass multiple queries,cause different data are needed.How to do that.The answer u provided will anyway work but won't fit my question.

gaan10 started a new conversation I Am Trying To Pass 2 Different Columns From My Sql Table To My View ,so That I Can Show Them. My Controller Is • 8 months ago

I am trying to pass 2 different columns from my sql table to my view ,so that i can show them. My controller is:

$interface = DB::table("users")->distinct()->get(['name']);
$interfac = DB::table("users")->distinct()->get(['email']);
        
        view()->share('users',compact('interface','interfac'));

My view is :

@foreach ($users as $key => $value)
<tr>
        <td>{{ $value->name }}</td>
        <td>{{ $value->email }}</td>
 </tr>

But this is not working while passing the two variables.If i pass one it is working but passing two is not working.thanks.

28th September, 2017

gaan10 started a new conversation Trying To Download A Pdf From My Html View Shows Variable Not Found. Using Laravel 5.3 • 8 months ago

I am creating a pdf for download from my html view.Html view is ok but when i try to download it Undefined variable: homedata. My controller is:

$homedata = $this->homevalues(); view()->share('homevalues',$homedata);

    if($request->has('download')){
        $pdf = PDF::loadView('reports');
        return $pdf->download('reports');
    }
    return view('reports',compact('homedata'));

17th December, 2016

gaan10 started a new conversation How To Validate Ip And Netmask Combination In Laravel 5 • 1 year ago

presently i have only simple ip validation .using something like this public function rules() { return [ // 'client_address_start' => 'required|ip', 'client_address_netmask' => 'required|ip', ]; }

do i need a custom rules .if yes how to do that

16th December, 2016

gaan10 left a reply on Unable To Provide Validation In Laravel5.3 • 1 year ago

THnaks much

gaan10 started a new conversation Unable To Provide Validation In Laravel5.3 • 1 year ago

I want to implement validation in my form request. For this i created a request class PostRequest.:

class PostRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return false; }

/**
 * Get the validation rules that apply to the request.
 *
 * @return array
 */
public function rules()
{
    return [
        //
     'client_address_start' => 'required|unique:posts|max:255',
    'admin_email' => 'required|email'
    ];
}

}

I have changed my store method in the controller also public function store(PostRequest $request)

This is my view file input field:

Admin Email
                        <div class="col-md-6">
                            <input id="admin_email" type="ip" class="form-control" name="admin_email" value="{{ $data->admin_email }}" required>
                             @if ($errors->has('admin_email'))
                                <span class="help-block">
                                    <strong>{{ $errors->get('admin_email') }}</strong>
                                </span>
                            @endif

                          
                        </div>
                    </div>           

But when i am posting the form its showing: ReflectionException in Route.php line 339: Class App\Http\Controllers\PostRequest does not exist. I am not sure if my validation is ok

12th December, 2016

gaan10 left a reply on How To Use Another Tables Field In Laravel • 1 year ago

sorry,i didn't understand

gaan10 started a new conversation How To Use Another Tables Field In Laravel • 1 year ago

I have the following view:

@extends('layouts.app')

@section('content')

    
                <div class="panel-heading">subnet_behind_clients1</div>
                <div class="panel-body">
            
                    <form class="form-horizontal" role="form" method="POST" action="{{ url('/subnet_behind_clients') }}">
                        {{ csrf_field() }}
                        
                        <div class="form-group{{ $errors->has('client_id') ? ' has-error' : '' }}">
                            <label for="client_id" class="col-md-4 control-label">client_id</label>

                            <div class="col-md-6">
                                <input id="client_id" type="client_id" class="form-control" name="client_id" value="1"  disabled >
                                 </div>
                        </div>


                        <div class="form-group{{ $errors->has('ip_address') ? ' has-error' : '' }}">
                            <label for="ip_address" class="col-md-4 control-label">ip_address</label>

                            <div class="col-md-6">
                                <input id="ip_address" type="ip_address" class="form-control" name="ip_address" required>

                            </div>
                        </div>


                        <div class="form-group{{ $errors->has('netmask') ? ' has-error' : '' }}">
                            <label for="netmask" class="col-md-4 control-label">netmask</label>

                            <div class="col-md-6">
                                <input id="netmask" type="netmask" class="form-control" name="netmask" required>

                                
                            </div>
                        </div>


                 
                        <div class="form-group">
                            <div class="col-md-8 col-md-offset-4">
                                <button type="submit" class="btn btn-primary">
                                    Apply
                                </button>

                            </div>
                        </div>
                 

                    </form>
                </div>
            
@endsection

Now i want to have a dropdown for the client_id that will take the values client_id from another table (clients) other than the one we are using rightnow. How to achieve that

6th December, 2016

gaan10 left a reply on I Am Not Able To Send My Form Data To The Database. • 1 year ago

yes i created the store method:

public function store(Request $request) {

     $data = Subnet_behind_client::first();
     

    $data->client_id = $request->client_id;
    $data->ip_address = $request->ip_address;


  $data->save();
    return back();

}

gaan10 started a new conversation I Am Not Able To Send My Form Data To The Database. • 1 year ago

THis is my create method in the controller:

public function create(Request $request) { $data = new Subnet_behind_client;

    return view('subnet_behind_clients1',compact('data'));


}

My form:

{{ csrf_field() }}
                    <div class="form-group{{ $errors->has('client_id') ? ' has-error' : '' }}">
                        <label for="client_id" class="col-md-4 control-label">client_id</label>

                        <div class="col-md-6">
                            <input id="client_id" type="client_id" class="form-control" name="client_id" required >

                            
                        </div>

                    </div>

                    <div class="form-group{{ $errors->has('ip_address') ? ' has-error' : '' }}">
                        <label for="ip_address" class="col-md-4 control-label">ip_address</label>

                        <div class="col-md-6">
                            <input id="ip_address" type="ip_address" class="form-control" name="ip_address" required>

                        </div>
                    </div>
Apply
                        </div>
                    </div>

My route file:

Route::get('/subnet_behind_clients1', '[email protected]')->middleware('auth');

Plz let me know where i am going wrong. Thanks

5th December, 2016

gaan10 left a reply on Not Able To Retrieve All Records From The Table • 1 year ago

should i put your create method inside public function create() in the controller?

gaan10 left a reply on Not Able To Retrieve All Records From The Table • 1 year ago

same issue.....when i send the data it overrites the earlier one and shows the result. I want to save multiple data and retrieve all

gaan10 started a new conversation Not Able To Retrieve All Records From The Table • 1 year ago

THis is my controller code for store function.But this is not working.What is the problem here:

public function store(Request $request) { //

     $data = Subnet_behind_client::all();

    $data->client_id = $request->client_id;
    $data->ip_address = $request->ip_address;
    $data->netmask = $request->netmask;
  //  $data->clients = $request->clients;

/* $data->created_at = new DateTime; $data->updated_at = new DateTime;*/

    $data->save();
    return back();

}
Edit Your Profile
Update

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