gaan10

Experience

2,280

0 Best Reply Awards

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

17th July, 2018

gaan10 started a new conversation Routes Are Not Working After The Site Is Directly Pointed To The Public Dir In Laravel • 2 months ago

I have pointed my site to load from public directory by modifying the DocumentRoot. Now the routes associted from the home page are not working. Home page of website is loading but the href and routes associated with it are not working. it says:

The requested URL /register_doctor_web was not found on this server.

Any pointers plz?

gaan10 left a reply on Cant Install Composer Says Certificate Issue • 2 months ago

I am using aws server. Its ok ,problem solved.

16th July, 2018

gaan10 started a new conversation Cant Install Composer Says Certificate Issue • 2 months ago

I am trying to install composer

sudo curl -sS https://getcomposer.org/installer | sudo php

But its says : curl: (60) Peer's Certificate issuer is not recognized. If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

So i tried this :

sudo curl  -k -sS https://getcomposer.org/installer | sudo php

But still its not working.

29th June, 2018

gaan10 started a new conversation Want To Crop A Part Of My Output Url To Show Only The Filename. • 2 months ago

Hello, My output url is coming as

var/www/html/procedures/public/storage/documents/7760600384/uploads/7760600384_202.jpg

out of this i want only the filename.jpg ex: 7760600384_202.jpg But from this code i am not able to do so.

foreach (glob("$path/*.jpg") as $filename) 
            {
                 
            echo chop($filename . "\n","$path/*.jpg");  
            
            }

plz help

gaan10 left a reply on Else Statement Not Working For The Following Php Code Ask • 2 months ago

i solved this by changing my logic.

$inputs = \Input::all();
$lists =  Gateway::Onlineschedule()->schedulelist($inputs['doctor_id']);
$today = Carbon::today()->format('d/M/Y');

$new_records = [];
        foreach ($lists as $list) 
        {
            $api_procedure['Day'] = $list->day; 
            $api_procedure['Day'] = Carbon::createFromFormat('d/M/Y', $api_procedure['Day'])->format('d/M/Y');

            if($api_procedure['Day'] > $today)
            {
                $new_records[] = $api_procedure;
            }

        }

        if(count($new_records) > 0) 
        {
             return $new_records;
        } 
        else 
        {
            return 'No records';
        }

27th June, 2018

gaan10 left a reply on Else Statement Not Working For The Following Php Code Ask • 2 months ago

i got same errors as before when using the else statements. i should have got 'No dates available' if else was working.But its not. why is else statement not working.

26th June, 2018

gaan10 left a reply on Else Statement Not Working For The Following Php Code Ask • 2 months ago

ok. I checked its not working.only if statement works when using else it fails.

gaan10 left a reply on Else Statement Not Working For The Following Php Code Ask • 2 months ago

@Yorki Did meant that i have to modify vendor/nesbot/carbon/Carbon/Carbon.php file.

gaan10 left a reply on Else Statement Not Working For The Following Php Code Ask • 2 months ago

getting this error @Yorki Call to a member function isFuture() on string

gaan10 left a reply on Else Statement Not Working For The Following Php Code Ask • 2 months ago

when i check the count by

dd(count($api_procedure['Day'] > $today));

it showed 1 even though it should be actually 0.since all dates were lower than today.

gaan10 started a new conversation Else Statement Not Working For The Following Php Code Ask • 2 months ago

I have this doctors schedule with dates and returning only those dates that are greater than today. But when there are dates that are previous to today,for which I am unable to return No dates available.

Here is my code:

$lists =  Gateway::Onlineschedule()->schedulelist($inputs['doctor_id']);
        //$today=date("d/M/Y");
        $today = Carbon::today()->format('d/M/Y');
    
        if(count($lists) == 0)
            {
                return 'No entry detected';

            }
            else
            {
                foreach ($lists as $list) 
                {
        
                    $api_procedure['Day'] = $list->day; 
                    $api_procedure['Day'] = Carbon::createFromFormat('d/M/Y', $api_procedure['Day'])->format('d/M/Y');
                    
                    if($api_procedure['Day'] > $today)
                    {
                        $listing[] = $api_procedure;
                    }
                    else
                    {
                        return 'No dates available';
                    }
                }
             
                return json_encode($listing);

            }

dd($lists) returns

Collection {#273
  #items: array:3 [
    0 => {#272
      +"id": 1
      +"doctor_id": "EZD0004"
      +"day": "13/Jun/2018"
      +"time_slot": "10:00PM,11:00PM,12:00PM"
      +"status": "Available"
}
1 => {#270
      +"id": 3
      +"doctor_id": "EZD0004"
      +"day": "24/Jun/2018"
      +"time_slot": "12:00pm,1:00pm"
      +"status": "admitted"
}
]
}

I think while using the if statement its not working properly. What should I change to get my desired output?

This is in laravel framework. Thanks.

15th June, 2018

gaan10 left a reply on Pagination For The View Is Not Working In Laravel5.3 • 3 months 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 • 3 months 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. • 3 months 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. • 3 months 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 • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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. • 3 months 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 months 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. • 3 months 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 • 5 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 • 5 months ago

ok solved.thanks

gaan10 left a reply on Laravel Sentinel Authentication Method Is Not Working • 5 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 • 5 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 • 5 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 • 11 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. • 11 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 • 11 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 • 11 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 • 11 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 • 11 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 • 11 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.

Edit Your Profile
Update

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