RajanSingh

RajanSingh

Member Since 3 Years Ago

Experience Points 1,050
Experience Level 1

3,950 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 0
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.

18 Sep
7 months ago

RajanSingh started a new conversation Subdomain As Api

Hello, I want to create api as a subdomain. for example if I hit http://api.domain.com/v1 should point "domain.com/api/v1".

I tried this Route::domain('api.beautyhubb.co.uk')->group(function () { Route::prefix('api/v1')->group(function () { Route::get('/', '[email protected]')->name('api'); }); });

but nothing is working.

24 Aug
7 months ago

RajanSingh left a reply on Youtube Video Downloader

Ok can you suggest any other package for youtube video download.

I tried with other packages but they downloads video in local machine. I need to download video on server not local machine. This package is doing this perfectely on localhost but not working for all vidoes on production.

RajanSingh left a reply on Youtube Video Downloader

Ok What I am doing. I am just passing video Id for download video.

set_time_limit(0); // Downloading a video may take a lot time

include 'vendor/autoload.php';

use Masih\YoutubeDownloader\YoutubeDownloader;

$youtube = new YoutubeDownloader('gmFn62dr0D8');

$youtube->download();

I am getting error like "An error occurred when downloading video" , "undefined index: type" etc.

It is not happening for all kind of videos.

RajanSingh started a new conversation Youtube Video Downloader

Hello,

I am using /Masih/YoutubeDownloader package. 

https://packagist.org/packages/masih/youtubedownloader

It is working fine on localhost but not working for some videos on server (Producation). Some videos id which are not downloading through this package on producation are "psSNSiSrk40"," JFcgOboQZ08 ".

Thanx

17 Nov
1 year ago
13 Nov
1 year ago

RajanSingh left a reply on Database [mysqli] Is Not Recognized

Thanx @frezno. It's fixed now.

12 Nov
1 year ago

RajanSingh left a reply on Database [mysqli] Is Not Recognized

I am using this package composer require shakahl/laravel-eloquent-mysqli

but I get this error

[InvalidArgumentException] Could not find package shakahl/laravel-eloquent-mysqli at any version for y our minimum-stability (stable). Check the package spelling or your minimum- stability

RajanSingh left a reply on Database [mysqli] Is Not Recognized

no I am not using any package. Can you suggest me any package.

RajanSingh started a new conversation Database [mysqli] Is Not Recognized

Hello, I installed fresh laravel 5.5. When I am trying to migrate database then I got "database [mysqli] is not recognized" error. My .env file is

DB_CONNECTION=mysqli DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=test DB_USERNAME=root DB_PASSWORD=

My config/database.php is 'mysqli' => [ 'driver' => 'mysqli', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'test'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, ],

How do I resolve this. Thanx.

25 Jan
2 years ago
24 Jan
2 years ago

RajanSingh started a new conversation Laravel DOMpdf

Hello,

     I am using laravel DOMpdf for creating pdf dynamically, and also I have to merge some pdf which is digitally signed. But when try to merge digitally signed pdf , I got "File is encrypted" exception.

 How to fix this problem.

Thanx

20 Jan
2 years ago

RajanSingh started a new conversation Encryption Error

Hello, I am using laravel DOMpdf to create a pdf file. I also want to merge pdf files of database into DOMpdf file. Please could anyone let me know , how to check a file is encrypted or not. I think bocause of an encrypted pdf file I am getting enryption error , when creating pdf.

$merger = new \PDFMerger; foreach($workerCertificates as $certificates){ $merger->addPDF(public_path().urldecode($certificates['url'])); } return $merger->merge('stream', "package-$item->number.pdf");

thanx

04 Jan
2 years ago

RajanSingh started a new conversation Fs-Upload

Hlw, I am using fs-upload for upload files. But It shows upload progress bar more than one however I am uploading just a single file. my code is.. $(this).ready(function() {

    var documentUpload = $('#document-uploads');
    var documentType = $('#documentType');
    var documentProgresses = $('#document-progresses');
    var documentBody = $('#document-body');

    var documentItem = function(documentTypeId) {
        documentUpload.upload('destroy');
        documentUpload.upload({
            action: '/system/employees/{{ $employee_id }}/certification',
            maxSize: 20971520,
            maxQueue: 1,
            postKey: 'files',
            postData: { documentType: documentTypeId }
        }).on('start.upload', function(e, files) {
            documentProgresses.show('slow');
        }).on('complete.upload', function(e) {
            documentProgresses.hide('slow');
        }).on('fileerror.upload', function(e, file, error) {
            $('div[data-index="d' + file.index + '"')
                    .addClass('progress-bar-danger')
                    .text(error);
        }).on('filecomplete.upload', function(e, file, response) {
            $('li[data-index="d' + file.index + '"').remove();
            if(response.id !== undefined) {
                var documentTypeName = $("#documentType option[value='" + response.job_document_type_id + "']").text();
                documentBody.append(documentTypeName + "&nbsp;<a href'" + encodeURI(response.url) + "' target='_blank'>" + encodeURI(response.url) + "</a>&nbsp;<span data-id='" + response.id + "' data-name='removeDocument'><i class='glyphicon glyphicon-remove-circle'></i></span><br />");
                
            }
        }).on('filestart.upload', function(e, file) {
            
            documentProgresses.append("<li class='list-group-item' data-index='d" + file.index + "'><div class='progress' data-index='d" + file.index + "'><div class='progress-bar' role='progressbar' aria-valuenow='0' aria-valuemin='0' aria-valuemax='100' style='width: 100%;'>" + file.name + ": 0%</div></div></li>");
        }).on('fileprogress.upload', function(e, file, percent) {
            $('div[data-index="d' + file.index + '"')
                    .css('width', percent + '%')
                    .attr('aria-valuenow', percent)
                    .text(file.name + ': ' + percent + "%");    
        }).on('filecomplete.upload', function(e, file){
            $.notify({ message: 'file uploaded' }, { type: 'success' });
        });
        
    };

    documentType.change(function() {
        documentItem($(this).val());
    });

    documentItem(documentType.val());


});
15 Dec
2 years ago

RajanSingh left a reply on Unknown Column Found

Thnx , It got fixed.

14 Dec
2 years ago

RajanSingh left a reply on Laravel DOMPDF Error

yes done it.....

12 Dec
2 years ago

RajanSingh left a reply on Unknown Column Found

Thanx for immedeat response

This is my model

class JobBioManifest extends Model { protected $table = 'job_bio_manifests'; protected $fillable = ['job_id', 'bio_manifest_id', 'bio_boxes_number'];

public static function boot() {
    parent::boot();

    JobBioManifest::observe(new JobBioManifestObserver());
}

}

my controller code for fetching data is:

$bioManifests_number_boxes = JobBioManifest::where('job_id', '=', $id)->where('bio_manifest_id', '=', $bioManifests->id)->pluck('bio_boxes_number');

error is

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'bio_boxes_number' in 'field list' (SQL: select bio_boxes_number from job_bio_manifests where job_id = 285 and bio_manifest_id = 4 limit 1)

RajanSingh started a new conversation Unknown Column Found

Hlw, Can you please help to fix this error "SQLSTATE[42S22]: Column not found".

I create a model all set all fileds in fillable array. When i Save data to that particular model , it's work fine. But at the time of fetching data , error whinch I mention abve occured.

  how to fix it.

Thanx

RajanSingh left a reply on Laravel DOMPDF Error

Thnx .. it's fixed

09 Dec
2 years ago

RajanSingh started a new conversation Laravel DOMPDF Error

Hello, I am using laravel DOMPDF and PdfMerger , how to fix the following error FPDF error: Unable to find pointer to xref table

thanx

22 Oct
2 years ago

RajanSingh left a reply on Jq Grid In Laravel

Thnx.. I got it...

I am trying to sign through google , but I get an error NotFoundHttpException in RouteCollection.php line 161: after entering email and password ... how to fix it..

21 Oct
2 years ago

RajanSingh started a new conversation Jq Grid In Laravel

Hlw, I want to use jq grid in my laravel app how to implement this...

Thnx

05 Oct
2 years ago
03 Oct
2 years ago

RajanSingh left a reply on Admin And Other User Authentication Through Default Laravel Authentication Using Single Model

thnx should i create a new table "user_roles" which has a relationship with users table or add a column role (boolean) in users table.

RajanSingh started a new conversation Admin And Other User Authentication Through Default Laravel Authentication Using Single Model

Hlw, I use laravel default authentication for creating user's. I want to create admin which handles other user's using laravel default authentication and single model. How to do this.

Thanx...

27 Sep
2 years ago

RajanSingh started a new conversation Only Able To Send Mail Which Is Registred In My Mailgun Account

Problem while sending mail Sending Hello , Actually I want to send email via mailgun. but I am able to sent mail only that email id which is used to create account in maigun.com however I am using activated sandbox domain.

when I am sending mail then the error occured....

Client error response [url] https://api.mailgun.net/v3/sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org/messages.mime [status code] 400 [reason phrase] BAD REQUEST

Setup is follow as....

I used "guzzlehttp/guzzle": "~4.0",

.env file

MAIL_DRIVER=mailgun

MAILGUN_DOMAIN=sandboxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.mailgun.org

MAILGUN_SECRET=key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

MAIL_HOST=smtp.mailgun.org

MAIL_PORT=587

[email protected].mailgun.org

MAIL_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

MAIL_ENCRYPTION=null

config/service.php file

'mailgun' => [

'domain' => env('MAILGUN_DOMAIN'),

'secret' => env('MAILGUN_SECRET'),

]

config/mail.php

'driver' => env('MAIL_DRIVER', 'smtp'),

'host' => env('MAIL_HOST', 'smtp.mailgun.org'),

'port' => env('MAIL_PORT', 587),

'from' => [

'address' => '[email protected]',

'name' => 'XXX',

],

'encryption' => env('MAIL_ENCRYPTION', 'tls'),

'username' => env('MAIL_USERNAME'),

'password' => env('MAIL_PASSWORD'),

'sendmail' => '/usr/sbin/sendmail -bs',

even i change "guzzlehttp/guzzle": "~5..3|~6.0" and update composer but still facing same problem.

plz help me to sove it....

thanx ..

24 Sep
2 years ago

RajanSingh started a new conversation PROBLEM IN SENDING MAIL VIA MAILGUN

Problem while sending mail Sending Hello , Actually I want to send email via mailgun. but I am able to sent mail only that email id which is used to create account in maigun.com however I am using activated sandbox domain. when I am sending mail then the error occured.... Client error response [url] https://api.mailgun.net/v3/sandboxbe3e99720745414ea0ad547399a3fe29.mailgun.org/messages.mime [status code] 400 [reason phrase] BAD REQUEST

Setup is follow as.... I used "guzzlehttp/guzzle": "~4.0", .env file MAIL_DRIVER=mailgun MAILGUN_DOMAIN=sandboxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.mailgun.org MAILGUN_SECRET=key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx MAIL_HOST=smtp.mailgun.org MAIL_PORT=587 [email protected].mailgun.org MAIL_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx MAIL_ENCRYPTION=null config/service.php file 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), ]

config/mail.php 'driver' => env('MAIL_DRIVER', 'smtp'), 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'port' => env('MAIL_PORT', 587), 'from' => [ 'address' => '[email protected]', 'name' => 'XXX', ], 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'sendmail' => '/usr/sbin/sendmail -bs',

HOW TO SOLVE THIS ERROR......

13 Apr
3 years ago

RajanSingh started a new conversation Form Submit Through Ajax With Laravel 5.2

Hlw..... I want to submit particular dynamic form through ajax in laravel my form blade.php is

@foreach($Products as $product) {!! Form::open(['action'=>'WishlistController@addproduct', 'class'=>'form-horizontal nobottommargin quick-contact-from', 'method'=>'post', 'id'=>'addproduct', 'files'=>true]) !!} Product_Image
                            <a href="javascript::void(0)" id="remove" class="btn btn-danger" onclick="return removeContainer(product{{$count}})">Remove</a>
                            <br><br>
                            {!! Form::button('Add To Wishlist', ['class'=>'btn btn-primary addtowishlist', 'value'=>'add', 'id'=>'{{$count}}', 'type'=>'submit'] ) !!} 
                        </div>
               </div>
                    {!! Form::close() !!}
                    <?php $count++  ?>
                    @endforeach

my ajax code is

$(document).ready(function(){

  $(".addtowishlist").click(function(){
    var id = $(this).attr('id');

  $("#addproduct"+id).on('submit',function(e){
    $.ajaxSetup({
      headers:{
        'X-XSRF-Token':$('meta[name="_token"]').attr('content')
      }
    }) 
    e.preventDefault(e);
    $.ajax({
      type:"POST",
      url:"/ajaxwishlist",
      data:$(this).serialize(),
      
      success:function(data){
        var result=data;
        if(result==1)
        {
          $("#resultis").css("display","inherit");
          $("#resultis").append("Item Added Succesfully");
         // $(".addtowishlist").html("Edit Product");

        }
      },
      error:function(data)
      {

      }
    })
  })
  })
})

controller function is

public function addproduct(Request $request) { $data=Input::all();

    $count=$request->input('countervalue');
   UserEventWishlistItem::create(array(
                'user_event_role_id'=> $userroleid,
                'product_name'=>$data['productName'.$count],
                'product_description'=>$data['productDescription'.$count],
                'product_image'=>$data['imgname'.$count],
                'product_price'=>$data['productPrice'.$count]
                )); 
     return 1;

}

and route is

Route::post('/ajaxwishlist','WishlistController@addproduct');

my problem is that when I click on add to wishlist button page is redirected and url changed to showwishlist to ajaxwishlist. Data is saved into database but I want to add product without redirecting page. plz help me thanx...

11 Apr
3 years ago

RajanSingh left a reply on Delete Record Using Ajax Call With Laravel

When I geting data which is passes through ajax call like this [$id=Input::get('id'); ] and used var_dump($id) then it return null. Mean data is not acctually passed ajax call to route url.

08 Apr
3 years ago

RajanSingh started a new conversation Delete Record Using Ajax Call With Laravel

Hlw.... I am new in ajax , I want's to delete a record using ajax call with laravel which handle that the page to not relode or refresh. this is my view {!! Form::open(['url'=>'wishlist/destroy', 'class'=>'form-horizontal nobottommargin quick-contact-from']) !!} {!! Form::button('delete', ['class'=>'btn btn-danger', 'type'=>'submit','id'=>'deleteProduct'] ) !!} {{Form::token()}} {!! Form::close() !!} my ajax call $(document).ready(function(){ $("#deleteProduct").click(function(){ var data=$("#delid").val();

    $.ajax({
        type:"POST",
        url:'/wishlist/destroy',
        data:{"id":data, "_token": "{{ csrf_token() }}" },
        success:function(result)
        {
          alert(result);
        }
    });
  });
});

my controller function public function deleteproduct() { $id=Input::get('id'); $productid=UserEventWishlistItem::find($id); if($productid) { $productid->delete(); return Redirect::back();

    }
}

and my route file Route::post('wishlist/destroy','WishlistController@deleteproduct'); but it's not working... plz help me thanx

21 Mar
3 years ago

RajanSingh left a reply on Getting Images From Folder Which Is Outside Of Public Folder

Thanx , but how to get image in blade, and from where to I call this route function,,,, actually I am new in laravel.. I use this to display image within public/uploads folder but now if I use above code which is seggested by you ( bobbybouwmann) so what will be image src ??

in place of

RajanSingh started a new conversation Getting Images From Folder Which Is Outside Of Public Folder

Hlw.... I have a problem , How to get images in blade which are stored outside of public folder. First i use this to get images from public/upload folder My Image but for the security of user information I have to store images outside of public folder .... so i move uploads folder to "app/uploads" then above code is not working..... How to fix this problem

19 Mar
3 years ago

RajanSingh left a reply on Redirection According To Condition After Auto Authentication In Laravel 5

Thanx for reply. I use postlogin() method but i got an error.....

ReflectionException in Route.php line 264: Class weddingcart\Http\Controllers\Auth\AuthController does not exist..

my code file is....

/** * Handle a login request to the application. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */

public function postLogin(Request $request)
{
    $email = $request->email

    $user = User::where( 'email' , $email );
    $user_id=$user->id;

    if($user)
    {
        $user_event=array();
        $UserEvent=UserEvent::all()->where('user_id',$user_id);
         foreach ($UserEvent as $Uevent) 
         {
            $user_event=$Uevent['id'];
         }
         if($user_event==null)
         {  
           $this->redirectPath = "/home";
         }
         else
         {
            $this->redirectPath="/wedding";
        }
    }
    return $this->login($request);
}

what should I do...

18 Mar
3 years ago

RajanSingh started a new conversation Redirection According To Condition After Auto Authentication In Laravel 5

Hello , I am new in laravel and using laravel 5 . As we know that It has auto authentication feature but My problem is that i want to redirect according to some condition after login. In my databse i have a user_event table. If user first login then it redirect to homepage like [redirectTo('/home')]. And then if User plan an event then eventid is saved into user_event table . So I don't understand where to code for checking that condition if user has event id then redirect to event page [redirectTo('/event')] else redirect to homepage [redirectTo('/home')].

Thanx