Van1310

Van1310

Member Since 11 Months Ago

Laravel Developer at Byte and Bits At Ahmedabad

Experience Points 24,100
Experience Level 5

900 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 111
Lessons
Completed
Best Reply Awards 10
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

15 Jul
15 hours ago

Van1310 left a reply on Undefined Variable: Mail

@nakov Thank You Sir Its working

Van1310 started a new conversation Undefined Variable: Mail

hii when i try to send mail then undefined variable error in laravl 5.5

here is my controller file

public function round_store(RoundRequest $request,$id)
    {
        $data= array('name'=>'byteandbits');
        $mail = jobapplication::where('id','=',$id)->first();
 
        $query=Round::where('user_id','=',$request->get('user_id'))
                ->where('round_type','=',$request->get('round_type'))->first();
        if(empty($query)){
                $round = Round::store($request);
                \Mail::send('mail.mail', $data, function($message) use($mail){
                    $message->to($mail->users->email)->subject
                        ('Laravel Round Registration');
                    $message->from('[email protected]');
                });
                flash('Round Added')->success();
                return back();
        }
        flash('Choose Valid Round')->error();
        return back();
    }

here is my formated blade file

Hello Candidate {{$mail->users->name}},

Welcome to Byte and Bits Team.

Your Are Selected For {{$mail->round}}.

Your Timing : {{$mail->date_time}}.

Report Shrusti Mam at Date and Time.

If any query contact us :9426652960 or [email protected]

13 Jul
2 days ago

Van1310 left a reply on Argument 1 Passed To Illuminate\Mail\PendingMail::queue() Must Be An Instance Of Illuminate\Mail\Mailable, Array Given, Called In

yes i used

namespace App\Http\Controllers;

use Illuminate\Http\Request; use App\Mail\Mailer;

class MailController extends Controller { public function mail(){ return view('admin.pages.mail.compose'); }

public function sendmail(Request $request){ // return $request; $email = $request->get('to'); // return $email; $data = [ 'subject' => $request->subject, 'message' => $request->message, 'files' => $request->files, ];

    \Mail::to($email)->queue(new Mailer($data));
}

}

Van1310 started a new conversation Argument 1 Passed To Illuminate\Mail\PendingMail::queue() Must Be An Instance Of Illuminate\Mail\Mailable, Array Given, Called In

i try to send mail in laravel 5.7 using queue then also use array value to send mail so then print error like

Argument 1 passed to Illuminate\Mail\PendingMail::queue() must be an instance of Illuminate\Mail\Mailable, array given, called in C:\laragon\www\bulk_emailer\app\Http\Controllers\MailController.php on line 24

so to fix it please help me out !

here is my controller code

public function sendmail(Request $request){
    // return $request;
    $email = $request->get('to');
    // return $email;
    $data = [
        'subject' => $request->subject,
        'message' => $request->message,
        'files' => $request->files,
    ];

    \Mail::to($email)->queue(new Mailer($data));
}
26 Jun
2 weeks ago

Van1310 left a reply on Call To A Member Function Save() On Array

@KIMA - thanks for reply its working help by @nakov but thanks a lots for helping us @kima

Van1310 left a reply on Call To A Member Function Save() On Array

@NAKOV - yaa its wroking thanks a lot brother i store the value one by one with name and id .

many many time thanks

Van1310 left a reply on Call To A Member Function Save() On Array

@KIMA - thanks for reply its working but whenever i submit data then store only first value all the value are not fetch so any idea how to do it

Van1310 started a new conversation Call To A Member Function Save() On Array

store a multiple record store in one column so i get error like this

here is my code

public function document_store(Request $request)
    {
        $data=Input::all();
        foreach($data['document'] as $files => $name)
        {
                if(!empty($name))
                {                           
                    $picName=$files . '.' . $name->getClientOriginalExtension();
                    $name->move(base_path() . '/public/training/document/'.$data['user_id'].'/',$picName);                

                    $document[] = new Document(array(
                        'user_id'=>$request->get('user_id'),
                        'doc_type' => $files,
                        'doc_path' => $picName,
                    ));
                    $document->save();
                    flash('Document Submited')->success();            
                    return \Redirect::back();                   
                }            
        }          
        // return $document; 
    }
24 Jun
3 weeks ago

Van1310 left a reply on Citywise Job Print Dropdown In Laravel

@JOHNBRAUN - Thanks For Reply I can try it

21 Jun
3 weeks ago

Van1310 started a new conversation Citywise Job Print Dropdown In Laravel

i have 2 dropdown first is city next one is job

when i click city then print citywise job print

for example click new york then open only newyork city job

so how to do it give me suggestion or examples how to learn it

thanks

20 Jun
3 weeks ago

Van1310 left a reply on Ajax Autosave Selection Without Submit Button

@JAY_CHAUHAN - Thank You Bro You Are Such A Camp, Rockstar Or Many More

Its Totally Working Thanks A Lot............

Van1310 left a reply on Ajax Autosave Selection Without Submit Button

@JAY_CHAUHAN - nothing error i just click my dropdown then cant update my status value so can you suggest some better solution

19 Jun
3 weeks ago

Van1310 left a reply on Ajax Autosave Selection Without Submit Button

@PEACENGARA - i am using localhost so how to share my code

here is i try this

blade file

<select class="form-control m-input" id="status" name="status">
        <option value="underprocess" >Under Process</option>
           <option value="reject">Reject</option>
        <option value="clear">Clear</option><br>
</select>

javascript file

<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
        $(document).ready(function(){
        $('select').live('change',function () {
                var statusVal = $(this).val();
                alert(statusVal);
                $.ajax({
                    type: "POST",
                    url: "round/update",
                    data: {statusType : statusVal },
                    success: function(msg) {
                        $('#autosavenotify').text(msg);
                    }
                })
        });
    });
</script>

route file

Route::post('round/update               /{id}',array('as'=>'round.edit','uses'=>'Admin\[email protected]_update'));

controller file

public function status_update(Request $request,$id)
    {
        \DB::table('rounds')
                ->where('id','=',$id)
                ->update([   
                    'status'=>$request->get('status')]);
                flash('Status Updated')->success();                        
                return back();
    }

please help me

Van1310 left a reply on Ajax Autosave Selection Without Submit Button

@SERGIU17 - i cant understand this packages please suggest me some other way to i do it

Van1310 left a reply on Ajax Autosave Selection Without Submit Button

@SERGIU17 - not work i try this

Under Process Reject Clear

document.querySelector('#update').addEventListener('change', function (e) { axios.patch('round/update/', { value: this.value }) });

Van1310 left a reply on Dropdown Value Store Without Page Refresh

@VANDAN29 - yes i try in ajax but i m new in ajax so i cant uderstand how it work please help me out

Van1310 left a reply on Dropdown Value Store Without Page Refresh

@PEACENGARA - thanks for reply but cant work i am new in ajax so can be more explain

here is my code

blade file

<select class="form-control m-input" id="#update" name="status">
        <option value="underprocess">Under Process</option>
           <option value="reject">Reject</option>
           <option value="clear">Clear</option>
</select>

Ajax code

<script>
        function dropdownUpdate() {
        $('#update').on('change', function(e) {
                e.preventDefault();             
                axios({
                    method: 'post',
                    url: 'round/update/{id}',
                    data: {
                            status: 'status'
                    }
                });
        }
</script>

Van1310 started a new conversation Dropdown Value Store Without Page Refresh

suppose i click dropdown value then automatically value store in database without page refresh or submit button

please help me

14 Jun
1 month ago

Van1310 left a reply on Login With Linkedin Using Socialite

@JAY_CHAUHAN - @jay_chauhan i try this two link then i post my error i will print error in above please help me out

13 Jun
1 month ago

Van1310 left a reply on If Condition Cant Work

@MVD - Thanks @mvd its working

Van1310 left a reply on If Condition Cant Work

@MVD - yes i try this but i have record which in inserted value="basic" so now i try this

@if(empty($interviewschedule)) 
    Data empty
@elseif($interviewschedule == "basic")
        Has Basic Data
@else
        False
@endif

but everytime its excute else condtion actually is run ifelse but run else so how the fix it

Van1310 started a new conversation If Condition Cant Work

i try to check if round_type field has data then condtion move on else if but cant work

here is my controller

public function view($id)
{
    $user=User::where('role','=','user')->first();
    $interviewschedule = Interviewschedule::where('user_id','=',$user->id)->pluck('round_type');
    return view('admin.pages.interviewschedule',compact('interviewschedule','user'));
}

blade file

@if(empty($interviewschedule->round_type)) 
    Data empty
@elseif($interviewschedule->round_type="basic")
    Has Basic Data
@else
    False
@endif

when try to condtion i have basic record in my field round_type but cant work elseif condtion every time is if condtion check

11 Jun
1 month ago

Van1310 left a reply on Login With Linkedin Using Socialite

@DIPAKRATANIAGILE - i dont know how to check it plz suggest me

Van1310 left a reply on Login With Linkedin Using Socialite

@DIPAKRATANIAGILE - you mean this code try in laravel but code is php ?

Van1310 left a reply on Login With Linkedin Using Socialite

@DIPAKRATANIAGILE - yes i try this but can't excute look like error in

GuzzleHttp \ Exception \ ClientException (410) Client error: GET https://api.linkedin.com/v1/people/~:(id,first-name,last-name,formatted-name,email-address,headline,location,industry,public-profile-url,picture-url,picture-urls::(original)) resulted in a 410 Gone response: { "errorCode": 0, "message": "This resource is no longer available under v1 APIs", "requestId": "EKBK7LJGCI", "s (truncated...)

Van1310 left a reply on Class App\Http\Controllers\ValidationsController Does Not Exist

show me your controller maybe your controller namespace is wrong

Van1310 left a reply on Login With Linkedin Using Socialite

when i try to login error

Laravel\Socialite\Two\AbstractProvider user …\app\Http\Controllers\Auth\LoginController.php73

Illuminate\Routing\Pipeline Illuminate\Routing{closure} …\app\Http\Middleware\RedirectIfAuthenticated.php36

Illuminate\Foundation\Http\Kernel handle …\public\index.php55

10 Jun
1 month ago

Van1310 left a reply on Login With Linkedin Using Socialite

@VANDAN29 - page not found error when i click login button in linkedin button

Van1310 left a reply on Login With Linkedin Using Socialite

@SERGIU17 - yes i read this then i post my error please help me

Van1310 left a reply on Login With Linkedin Using Socialite

@SERGIU17 - i try to login using linkedin socialte package and error like

Sorry, the page you are looking for could not be found.

my controller

public function redirect()
    {
        return Socialite::driver('linkedin')->redirect();
    }

public function handleProviderCallback()
    {

        $linkdinUser = Socialite::driver('linkedin')->user();
        $existUser = User::where('email',$linkdinUser->email)->first();

        if($existUser) {
            Auth::loginUsingId($existUser->id);
        }
        else {
            $user = new User;
            $user->name = $linkdinUser->name;
            $user->email = $linkdinUser->email;
            $user->linkedin_id = $linkdinUser->id;
            $user->password = md5(rand(1,10000));
            $user->save();
            Auth::loginUsingId($user->id);
        }
        return redirect()->to('dashboard');
    }

Van1310 left a reply on Login With Linkedin Using Socialite

@VANDAN29 - i try this but page not found error when i try to login

Van1310 started a new conversation Login With Linkedin Using Socialite

i try to login but cant login using linkedin

please help me out

try to various link in google but i cant excute.

please some better solution

07 Jun
1 month ago

Van1310 left a reply on Two Value Display In Single Dropdown In Laravel

@SIANGBOON - Yes Thanks To All You All Are right answer

Van1310 left a reply on Two Value Display In Single Dropdown In Laravel

@SIANGBOON - i try this but can't work code only display branch

Van1310 started a new conversation Two Value Display In Single Dropdown In Laravel

here is my code

<select class="form-control m-input" name="branch_id">
    @foreach($branch as $branches)
        <option value="{{$branches->id}}">{{$branches->branch.$branches->branch_info}}</option>
    @endforeach
</select>

how to display two value in single dropdown i have branch name and branch_info i have display in single dropdown in two value

31 May
1 month ago

Van1310 started a new conversation Warning Invalid App ID: The Provided App ID Does Not Look Like A Valid App ID.

when i try to facebook throught login then error

services.php

'facebook' => [
    'client_id' => '',
    'client_secret' => '',
    'redirect' => 'http://localhost:8000/callback',
    ],

SocialAuthFacebookController

public function redirect()
    {
        return Socialite::driver('facebook')->redirect();
    }

public function callback(SocialFacebookAccountService $service)
    {
        $user = $service->createOrGetUser(Socialite::driver('facebook')->user());
        auth()->login($user);
        return redirect()->to('/home');
    }

blade file

<a href="{{url('/redirect')}}" class="btn btn-primary"> Facebook </a>

how to fix it when i try click facebook login error appid

30 May
1 month ago

Van1310 left a reply on Flash Not Work In Laravel 5.5

@VANDAN29 - ok then try it php artisan view:clear or try this

composer dumpautoload

Van1310 left a reply on Flash Not Work In Laravel 5.5

config folder in app.php file providers in define also javascript file

27 May
1 month ago

Van1310 left a reply on How To Dropdown Citywise Job Display In Laravel

@VANDAN29 - yes bro i try this link and i try to solved but i can't fix it thats why i create a question in laracast

Van1310 started a new conversation How To Dropdown Citywise Job Display In Laravel

i have one table which field name city and job

then i choose city then display jobs

here is mycode

controller file

public function city()  
{
    $city = \DB::table("addjobs")->pluck("city","id");
    return view('job',compact('city'));
}

public function getJobList(Request $request)
    {
        $job = DB::table("addjobs")
            ->where("id",$request->id)
            ->pluck("jobtype","id");
            return response()->json($job);
    }

here is my blade file

<label>City</label>
<select name="city" id="city">
    @foreach($city as $key => $citys)
        <option value="{{$key}}">{{$citys}}</option>    
    @endforeach
</select>

<label>Job</label>
<select name="job" id="job"> </select>

here is javascript code

<script type="text/javascript">
    $('#city').change(function(){
        var countryID = $(this).val();    
        if(countryID){
            $.ajax({
                type:"GET",
                url:"{{url('get-state-list')}}?id="+countryID,
                success:function(res){               
                    if(res){
                        $("#job").empty();
                        $("#job").append('<option>Select</option>');
                        $.each(res,function(key,value){
                            $("#job").append('<option value="'+key+'">'+value+'</option>');
                    });          
                }else{
                $("#job").empty();
                }
        }
    });
    }else{
        $("#job").empty();
        }      
});
</script>
25 May
1 month ago

Van1310 left a reply on Update Query Can't Working In Laravel

@SNAPEY - @snapey thank you very much sir

Van1310 left a reply on Object Of Class Illuminate\Database\Eloquent\Builder Could Not Be Converted To String

@NIONTA - yes its working bro thank you so much for helping me

love you from india

Van1310 left a reply on Update Query Can't Working In Laravel

@DEVFREY - i apologize for your time wasting but this forum like very learning purpose so please be sorry

Van1310 left a reply on Update Query Can't Working In Laravel

@DEVFREY - i can solve my self very simple

return $data=Reschedule::pluck('i_reschedule')->first();