kuns25

kuns25

Member Since 10 Months Ago

Pune

Laravel Developer at Drogenide Softwares Pvt Ltd

Experience Points 10,530
Experience Level 3

4,470 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 89
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

16 May
1 week ago

kuns25 left a reply on Error On Migration

Either change original migration from bigIncrements() to just increments();

Or in your foreign key column do bigInteger() instead of integer().

06 May
2 weeks ago

kuns25 left a reply on UnexpectedValueException The Response Content Must Be A String Or Object Implementing __toString(), "object" Given.

@FTIERSCH - I get it now , actually i was using query as input parameter , i think we cannot use "query" key for your request as it is used in laravel. when i change input name attribute to something else , its working fine . Thanks for the support sir :) .

kuns25 left a reply on UnexpectedValueException The Response Content Must Be A String Or Object Implementing __toString(), "object" Given.

@FTIERSCH - @ftiersch this is what i was trying to achieve

public function search(Request $request)
        { 
            $query= $request->input('query');
            $users = User::where('name','like',"%$query%")->get();

        return  view('searchresults')->with('users',$users);
        }

kuns25 started a new conversation UnexpectedValueException The Response Content Must Be A String Or Object Implementing __toString(), "object" Given.

I'm trying to return email that i received from request , simply by doing $request->email , its getting me above error , but its working completely fine when i type $request->input('email') . why is this happening , whats the difference between these two .

my Route :

Route::get('search','[email protected]');
Route::get('searchresults','[email protected]');

my view

    <form action="{{ url('searchresults') }}" method="get">

                <div class="form-group">
                    <label >Search User</label>
                    <input type="text" class="form-control" name="query">
                </div>
                <button class="btn btn-primary" type="submit">Submit</button>
            </form>

my search controller

public function search(Request $request)
    { 
        return  $query= $request->query;  
     
    }

//usually it works , never got this kind of error , not at least for this situation

01 May
3 weeks ago

kuns25 left a reply on [5.3] Multi Auth Configuration Problem: Guards Use Same Session

@HESTO - @hesto Hii I've Installed the package i can't find where admin/home route is defined , or from which controller its returning me the view admin.home blade file , can you help me .

25 Apr
4 weeks ago

kuns25 left a reply on Error Exception Array To String Conversion In Curl

@MVD - @mvd yes I'm excecuting the api request ,just forgot to add in above question

kuns25 started a new conversation Error Exception Array To String Conversion In Curl

Hi I'm trying to to Integrate Hubtel Payment Gateway but getting Array to string Conversion Error Exception .

if i do CURLOPT_POSTFIELDS =>http_build_query ($invoice), im getting blank response

please help

     $items = ["name" => "Harry Potter", "quantity" => 1, "unitPrice" => 50];
      $invoice = array("items" => $items, "totalAmount" => 1, "description" => "test", "callbackUrl" => "https://localhost:8000/status","returnUrl"=>"https://localhost:8000/return","cancellationUrl"=>"https://localhost:8000/cancel",
        "merchantBusinessLogoUrl"=>"https://localhost:8000/wallet","merchantAccountNumber"=>"HM0409180006","clientReference"=> '1');
      $curl = curl_init();

      curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api.hubtel.com/v2/pos/onlinecheckout/items/initiate",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_POSTFIELDS => $invoice,
        CURLOPT_HTTPHEADER => array(
          "Authorization: Basic bjJXS0o1Qjo0saMWU4NzA4ZS0wODVkLTQ0NDwUtOTQ3ZS1hZjBiODlkNzI1OWY=",
          "Content-Type: application/json",
          "Postman-Token: 2bd373c8-3669-4f5f-93e9-d3001af0a9cff",
          "cache-control: no-cache"
        ),
      ));
23 Apr
1 month ago

kuns25 started a new conversation How Much Of Code Syntax You Guys Remember?

Hii , I started my career as web developer last year. Well half of the time i have to look back for my last written code to check how i did that. I was wondering you guys ever had the same problem . I mean how much of the things you remember. There are so many languages/libraries/frameworks of all of which you have to remember the syntax.

There is Core Php/ Laravel/codeigniter/ then vuejs/vanillajs/jquery/ and much more like firebase/ajax/axios/curl/oop/guzzle/vuex/nuxt/redis/unit testing/sass/bootstrap all those sql queries .and each of these has there own big world.

I'm really bad at explaining things, Hope you Understand what im trying to say

Please Guide .

02 Mar
2 months ago

kuns25 left a reply on Method Illuminate\Database\Eloquent\Collection::orderBy Does Not Exist.

@SNAPEY - @snapey please tell me that we don't have to use get() in collection methods and it will still work, like we use get() / First () in queries , now I get the difference between query get & collection get method.

01 Mar
2 months ago

kuns25 left a reply on How Do I Display Only Eloquent Related Data In Blade File

@D9705996 - Yeh thanks man this was simple solution , i was so naive back then, now after few months i can understand what everyone was trying to tell.

26 Feb
2 months ago

kuns25 left a reply on Method Illuminate\Database\Eloquent\Collection::orderBy Does Not Exist.

@SNAPEY - ya actually im adding show more button , thats why also loading all posts

23 Feb
3 months ago

kuns25 left a reply on Method Illuminate\Database\Eloquent\Collection::orderBy Does Not Exist.

Thanks for replying ,I'm getting this error now ,

Too few arguments to function Illuminate\Support\Collection::get(), 0 passed in C:\xampp\htdocs\laravel\twitter\app\Http\Controllers\HomeController.php on line 26 and at least 1 expected
 return $posts = $allposts->take($request->get('limit', 20))->sortByDesc('created_at')->get(); 

kuns25 started a new conversation Method Illuminate\Database\Eloquent\Collection::orderBy Does Not Exist.

This Query Giving me above error


$allposts =  Post::whereIn('user_id',$request->user()->following()->pluck('follower_id')->push($request->user()->id)) ->with('user')->get();

 return $posts = $allposts->take($request->get('limit', 20))->orderBy('created_at', 'desc')->get();

Thanks in advance

21 Feb
3 months ago

kuns25 started a new conversation How Do You Guys Create Admin Panel In Laravel

Hii , Just wanted to know what steps you guys follow to create Admin Panel (Multi Auth) in Laravel . Like do you use any admin panel Generator like voyager ,( I don't know how to use that yet) , or Use any admin related package or Create Seperate Auth Controller for admin overriding default auth methods .

Also do you Create Separate model for admin or just add isAdmin field in User Model / Database .

please give me tips for creating admin panel in laravel.

Thanks

17 Feb
3 months ago

kuns25 left a reply on Passing Data From Child Vue Component Via Events Is Giving Undefined

Sorry for trouble i don't know what happen but when i re run npm watch it solved it problem

kuns25 started a new conversation Undefined , Error In Emiting Event And Passing Value From One Component To Another

I'm very new to vue , i have 3 simple components in my laravel project , one PostForm to post a tweet , and others to show the post on timeline . I am using axios of post and get that from backend . When im posting a tweet its getting saved in my database , but when i pass data by event , its giving https://snag.gy/Cjlaw6.jpg error to me.

My Code is here .

PostForm component ` <form action="#" class="form-vertical" @submit.prevent="post"> Post it!

import eventhub from '../event' export default{ data(){ return{ body:null } }, methods:{ post(){ console.log(this.body) axios.post('posts',{ body:this.body }).then((response)=>{
        eventhub.$emit('post-added', response.body)
            this.body=null
        })
    }
}

}

` when i console.log(response.data) i am getting everything properly https://snag.gy/vNYL57.jpg , and then im emitting event named post-added to my timeline component.

Timeline Component ` Timeline

import eventhub from '../event' import Post from './Post.vue' import postform from './PostForm.vue'

export default { data(){ return{ posts:[] } } , components:{ Post,postform } , methods:{ addpost(record){

    }
},
mounted() {
    eventhub.$on('post-added',this.addpost)
    axios.get('/posts').then((response)=>{
        this.posts=response.data
        
    })
}

}

` I am catching that post-added event in mounted , and then passing the value to addpost method(record) .This is where i am getting the attached error https://snag.gy/Cjlaw6.jpg .

In addpost method when im trying to console/log(record) its giving me undefined , i think this is the error and i have no idea why its giving me undefined https://snag.gy/Hz1Xo3.jpg

Thanks in advance ,

16 Feb
3 months ago

kuns25 left a reply on How To Turn Off "build Sucess" Notifications From Laravel Mix?

ok if anyone is saying this isn't working you have to close / terminate and re run your npm run watch after adding mix.disableSuccessNotifications();

07 Feb
3 months ago

kuns25 left a reply on Forget Password

if you are saying you want to send otp about forget password to user , you can use twilio for that

27 Jan
3 months ago

kuns25 left a reply on Need Help In Twilio Sms API Integration

@BOBBYBOUWMANN - Hii Really Thanks for replying to my question , Actually i have never integrated a third party api without any packages , can you please guide me or share any tutorials where i can learn how to integrate api by reading simply documentation , i tried finding on youtube , but most of them are about using packages .

Also there is one more twilio package which dose not required notification https://github.com/aloha/laravel-twilio

i also successfully integrated this package in laravel 5.7 , but my current project is in laravel 5.3.

in aloha readme its written

And make these objects resolvable from the IoC container:

Aloha\Twilio\Manager (aliased as twilio) Aloha\Twilio\TwilioInterface (resolves a Twilio object, the default connection object created by the Manager).

i Can't understand this step for 5.3 .

Thanks in advance

kuns25 started a new conversation Need Help In Twilio Sms API Integration

Hii , Im using http://laravel-notification-channels.com/twilio/ package , for integration of twilio sms .

I am verifying user mobile number during registration . I did all the configuration given in the package , and luckily im getting sms as well , user is getting verified as well .

I want to change the flow of verification of user , currently im first saving user with mobile number in database , then sending sms .i want to verify mobile number before saving data in Database . in package its given we can we can send sms by using below function in notifiable model , but for request we dont use any model , how can i fix that ,i dont know how to send sms to input mobile no.,

// code to enter in notifiable user model
public function routeNotificationForTwilio()
{
    return '+1234567890';    // or we can say $this->mobile
}

Please Help me how can i pass my $request->mobile in my notification 

``
The Code is pretty simple .

you can check it 

My web.php
18 Jan
4 months ago

kuns25 left a reply on Cant Send Mail In Laravel 5.3

@REALRANDYALLEN - Broo Thanks.

Config:clear

This Helped

kuns25 left a reply on Cant Send Mail In Laravel 5.3

@MARTENVANURK - its fine im already aware of that , ill reset it , do you know the solution.

kuns25 left a reply on Cant Send Mail In Laravel 5.3

yes , heres my .env

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=a3f1dcf02c001e    
MAIL_PASSWORD=58fbbe5156119c
MAIL_ENCRYPTION=null

kuns25 started a new conversation Cant Send Mail In Laravel 5.3

Hii , Im trying to send mail in my laravel 5.3 project , but im not receiving any mail , neither im getting any error , also mail code when i use in laravel 5.7 im receiving mail on my mailtrap .

please guide me if there is any difference in laravel 5.3 & 5.7 mail.

code is quite simple , please help

My Route


Route::get('contacts','[email protected]');


My Controller

<?php

namespace App\Http\Controllers;

use App\Mail\mailtrap;
use Illuminate\Support\Facades\Mail;

  
class MailController extends Controller
{
    public function index(){
    
    Mail::to('[email protected]')->send(new mailtrap());
         
    }
}
 

my mailable

<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;

class mailtrap extends Mailable
{
    use Queueable, SerializesModels;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->view('email');
    }
}

my view

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Mail Send</title>
</head>
<body>

    <h3>You Have Received Enquiry From Website</h3>
    
    


</body>
</html> 

14 Jan
4 months ago

kuns25 left a reply on Paid Laracast Tutorials?

@shez1983 , I already have course code subscription lol .Alex is good but still i'll say jeffreyway is a lot better teacher in many ways.

kuns25 left a reply on Paid Laracast Tutorials?

@jeffreyway I am getting "Your card does not support this type of purchase" error. Can i pay with paypal or any other medium

25 Dec
4 months ago

kuns25 left a reply on Paid Laracast Tutorials?

@JEFFREYWAY - its showing 16 series for laravel , is that all .

17 Dec
5 months ago
12 Dec
5 months ago

kuns25 left a reply on Laravel Does Not Display Images In The View From Storage Folder

I Suggest you to link your storage folder to public folder by using php artisan storage:link command

then try

` <img src="{{ asset('storage/public/cover_images'. $book->image )}}"

`

kuns25 left a reply on Check If Input Value Before Update

while updating you dont need to check or validate anything Laravel Does this automatically for you yes if you are asking in case of user password update you can validate if user is entering same old password with below password comparison ` $user =Auth::id();

if(Hash::check($request->password, $finduser->password)) { return 'Old password and new password cant be same' } else { $user->password = bcrypt($request->password); $user->save(); } ` obviously you can return response with flash session , and many more things , its all up to you.

kuns25 left a reply on Check If Input Value Before Update

while updating you dont need to check or validate anything Laravel Does this automatically for you yes if you are asking in case of user password update you can validate if user is entering same old password with below password comparison

$user =Auth::id();

if(Hash::check($request->password, $finduser->password)) { return 'Old password and new password cant be same' } else { $user->password = bcrypt($request->password); $user->save(); }

obviously you can return response with flash session , and many more things , its all up to you.

06 Dec
5 months ago

kuns25 left a reply on UPGRADE TO LARAVEL 5.7 FROM 5.4

@PETRIT - tried to upgrade to 5.5 still showing the older version

kuns25 started a new conversation UPGRADE TO LARAVEL 5.7 FROM 5.4

Hii , So I have an old project in laravel 5.4 & wanted to upgrade it to 5.7 , all i did was change my "laravel/framework": "5.7.*"(composer.json) and run composer global update .when command executed successfully and i check php artisan --version , its showing laravel framework 5.4 .

where did i go wrong , please guide .

Thanks in Advance

kuns25 left a reply on Disable Updated_at Time Of Insert

In your model just add

$timestamps = false;

and we are good to go

27 Nov
5 months ago

kuns25 started a new conversation Paid Laracast Tutorials?

After 6 Months of experience in Laravel , Today I accidentally watched Some Videos of Laravel 5.7 from scratch on laracast, Videos were so awesome that it clears many basic concept that i was not aware of till date. so i was thinking to get Paid Subscription of Laracast .

Just Wanted to Know What im gowning to learn in Paid Version . Do They teach Entire Project Building From Strach , Can you Share list of some Series names,or How Many series are there to learn .

Thanks.

21 Nov
6 months ago

kuns25 left a reply on Check For A Specific Value In Validation Or Add Prefix In Login Controller

@SIRIK - Hii , Actully i checked , but couldnt understand ,how to validate if a particular character (+91) is added or not in the form field .

kuns25 started a new conversation Check For A Specific Value In Validation Or Add Prefix In Login Controller

Hii ,

       I have a simple login form , where user enters mobile number and password for login .

How can i validate in my logincontroller i.e authenticateusers , where it will check if user has added country code i.e "+91" in mobile number field or not .

or pls guide how can i directly pass +91 in my login credentials so user wont have to enter country code everytime. (i mean how to concatinate +91 with mobilenumber) .

31 Oct
6 months ago

kuns25 left a reply on Need To Learn Date Range Filter In Laravel

@bobbybouwmann Hey Really Thanks , Can share Blade File please.

kuns25 started a new conversation Need To Learn Date Range Filter In Laravel

Hii I have simple registered user table , i want to add Add Range Filter Where admin can select From & To Date From Date picker // Calendar . Is there any tutorials on youtube , laracast , or anywhere can i see some sample demo code . please suggest .

Thanks & Regards,

29 Oct
6 months ago

kuns25 started a new conversation SQLSTATE[42000]: Syntax Error Or Access Violation: 1071 Specified Key Was Too Long; Max Key Length Is 767 Bytes (SQL: Alter Table `users` Add Unique `users_email_unique`(`email`))

Every Time while migrating in a new project , i get this error SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter tableusersadd uniqueusers_email_unique(email))

, i know we can resolve this issue by adding default string length in app service provider .

My Question is that why laravel don't dosen't provide it as by default . this irritates sometimes.

27 Oct
6 months ago

kuns25 left a reply on [Vue Warn]: Error In Mounted Hook

@tomasz.r @Mantey where did you put cdn file in laravel , in app.js or app.blade.php or in your example.vue file .please guide

09 Oct
7 months ago

kuns25 started a new conversation How To Create Virtual Balance / Money In Laravel

Hii Im trying to integrate third-party api for Mobile & DTH Recharge , I Want to create virtual money , where i transfer balance/amount from admin to my retailers and they can do transactions.

pls guide thanks.

kuns25 started a new conversation Will Laravel Upgrate To 5.7 Affect My Register Controller

Hii Im currently using laravel 5.6 , was going to upgrate to 5.7 , Actually im already registering users in 5.6 by default auth register , will update affect my user and admin register controller , also can i use verify email by maulally creating new column in table i.e email_verified_at .

Sounds stupid question .sorry for that , just want to make sure.

01 Oct
7 months ago

kuns25 started a new conversation "This Page Can't Load Google Maps Correctly." Error In Admin Panel Form Field

Hii Im trying to get address from google maps in form field found below code on stack overflow . When i run below code saved in .html format and also in simple blade file

Route::get('google',function(){

return view('google');

}); Its working good .

but again same code when pasted in my admin module its giving me error "This page can't load Google Maps correctly." Error in Admin Panel Form Field" I haven't added my google api key anywhere as it was working fine in .html , is it not working because im applying guards and middleware in code. please help

code is as below :

    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=places&language=en-AU"></script>
    <script>
        var autocomplete = new google.maps.places.Autocomplete($("#address")[0], {});

        google.maps.event.addListener(autocomplete, 'place_changed', function() {
            var place = autocomplete.getPlace();
            console.log(place.address_components);
        });
    </script>
</body>

28 Sep
7 months ago

kuns25 left a reply on How Do I Display Only Eloquent Related Data In Blade File

@Snapey just passed get() ,and it resolved my error

,

$healthpackages = healthpackage::whereHas('categories',function($query){ $query->where('category','popular'); })->get();