abhimanyusharma003

abhimanyusharma003

Member Since 5 Years Ago

Experience Points
20,445
Total
Experience

4,555 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
180
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.

Level 5
20,445 XP
27 Oct
1 year ago

abhimanyusharma003 left a reply on Laravel Coding Style

No, there is no official guide for this. You can use tools like php-cs-fixer with PS2 that will fix your coding style.

23 Oct
2 years ago

abhimanyusharma003 left a reply on Json Column Update Eloquent

Never Mind, It was a bug in Laravel and has been updated :)

It will work fine like this

       $user->update([
            'settings' => [
                'is_subscribed' => 0,
                'push_notifications' => [
                    'follow' => false,
                ]
            ],
        ]);

abhimanyusharma003 started a new conversation Json Column Update Eloquent

I'm trying to update json column using eloquent but is not working.

Not working

        User::whereId(1)->update([
                'settings->push_notifications->follow' => false,
            ]);

Somehow if I use DB class, it works.

Works

        DB::table('users')
            ->where('id', 1)
            ->update([
            'settings->push_notifications->follow' => false
        ]);

Is it so that laravel don't support update of json column using eloquent ?

Here is JSON what that I would like to update

{
  "push_notifications": {
    "follow": true,
    "comment": true
  }
}
30 Aug
4 years ago

abhimanyusharma003 left a reply on Homestead Connection Issues

Yes, this is really problem on windows right now, I was also facing the same issue but luckily 100% fresh install of vagrant and virtualbox resolved the issue. Make sure to delete vagrant.d and Virtubal Vm folders from c:\{user}

28 Aug
4 years ago

abhimanyusharma003 left a reply on Add Parameters To Current URL

You can do like this in laravel

url('modes',['game' => 1,'category' => 3,'page' => 6]);
24 Aug
4 years ago

abhimanyusharma003 left a reply on Fontastic Not So Fantastic

It may be some issue with your ISP.

13 Aug
4 years ago

abhimanyusharma003 left a reply on Vagrant/Virtual Box Issue Windows 10

  • Make sure you have provided path to your .ssh key in homstead.yml file.
  • Run homestead destroy and homestead up

I hope this helps, good luck.

abhimanyusharma003 left a reply on Multiple Emails

One way to get around.

        $users = User::all();
        $data = array(
            'messages' => $request->get('messages'),
        );
        foreach($users as $user) {
            $email = $user->email; 
            Mail::send('emails.test',$data, function($message) use ($email)
            {
                $message->to($email)->subject('Hello');
            });
        }

I have used $email variable here because if I remember correctly catching $user->email in Mail::send was causing issue to me.

The best way around can be

        $emails = User::all()->list('email');
        $data = array(
            'messages' => $request->get('messages'),
        );
        Mail::send('emails.test',$data, function($message) use ($emails)
        {
            $message->to($emails)->subject('Hello');
        });

abhimanyusharma003 left a reply on Laracon 2015 Videos

I was at the laracon but din't enter the hall because I thought I can watch videos later on, and this happened ;)

abhimanyusharma003 left a reply on Vagrant/Virtual Box Issue Windows 10

Search for device manager. Then check here, I was having unwanted network adapter which was causing issue to me. I remove it and everything is good to with test build of virtualbox.

abhimanyusharma003 left a reply on Vagrant/Virtual Box Issue Windows 10

Un-install virtual box and vagrant. Download test build of Virtual Box https://www.virtualbox.org/wiki/Testbuilds ( Windows ) Install it, then install Vagrant.

PS: Make sure remove any unwanted network interface in Windows driver options.

10 Aug
4 years ago

abhimanyusharma003 left a reply on Homestead Can Not Work With Hhvm

@fideloper I destroyed the current homstead box and started it again, i'm still getting same error, any help will be great.

homestead destory
homestead up

and error is same as posted above

==> default: hhvm: unrecognized service
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

abhimanyusharma003 left a reply on Laravel For Android Apps

You can develop/create API for your android application(s) on Laravel, in that way you are serving data from your server ( Laravel app ) to your android application(s).

No, you can't build native android/ios apps in Laravel, you have too choose either Java or JavaScript.

abhimanyusharma003 left a reply on List Most Latest Data According To Date Coloumn And Time Coloum

Can't say it's the best method but will work

PhoneBooking::latest('date')->latest('time')->get();

abhimanyusharma003 left a reply on Blade Engine Not Working On My Live Server?

Change the permission of \storage\framework\views to 777 . But you are saying that you did this, then check the error log, if there is anything in it.

07 Aug
4 years ago

abhimanyusharma003 left a reply on Homestead Can Not Work With Hhvm

Facing same issues, i'm using box image version 0.2.7 any solution for such ?

03 Aug
4 years ago

abhimanyusharma003 left a reply on 404 Not Found Error On Live Server

Check your nginx or apache routing. In apache check if mod_rewrite is enabled

abhimanyusharma003 left a reply on 404 Not Found Error On Live Server

Check if you have route for the post request on that form.

31 Jul
4 years ago

abhimanyusharma003 left a reply on Whats Your Favorite Dev Distro???

Lubunut or Xubuntu. But I'm using windows these days, with vagrant.

29 Jul
4 years ago

abhimanyusharma003 left a reply on Email Conformation Help Needed

You can wrap User::whereToken($token)->firstOrFail()->confirmEmail(); in try{ } catch (e) { } block, if no token preset or found it will thorough exception, catch that and redirect user back.

abhimanyusharma003 left a reply on Homestead 2.0 Unbearably Slow..

If you have huge number of files rm -rf takes time to process. Some how everything is working fine for me, other than HHVM

abhimanyusharma003 left a reply on How To Install PHP Artisan?

First install

  • PHP
  • Composer

then follow the instructions as given on this page http://laravel.com/docs/5.0/installation cd in to new laravel folder there you can run php artisan command.

abhimanyusharma003 left a reply on Only Registered Users Should Create New Users

Basically you want that your user can create new user, that means it can create new entry in your database. In that case it is not necessary to use AuthController Class you can create new controller class to save the entry into your database.

abhimanyusharma003 left a reply on How Big Is Too Big?

Yes you can use laravel for very big websites, it also depends how you code the stuff. I have head that fallout 4 game website is built on Laravel framework.

abhimanyusharma003 left a reply on Developing Laravel Apps On: Windows Vs Linux

I use windows, I don't see any difference if you are using Laravel homestead. Yes you have more tools available on linux with good terminal. But you can use cmder on windows.

abhimanyusharma003 started a new conversation Homestead HHVM Error

I'm trying to use HHVM on homestead, but every time the load up the VM I get this error.

==> default: hhvm: unrecognized service
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

I have tried few suggestions posted in thread bug everything fails.

PS: Yes it's fresh setup and everything is up to date.

24 Mar
4 years ago

abhimanyusharma003 left a reply on Form Help Guys

On laravel 5 first install Laravel Collective Form and Html module http://laravelcollective.com/docs/5.0/html#installation , then provide the aliases after that use

 {!! Form::open() !!}

{!! Form::close() !!}

abhimanyusharma003 left a reply on A Few New Things On The Video Page

This is nice.

New player is really good and lot better then previous one.

08 Mar
4 years ago

abhimanyusharma003 left a reply on Using An Other Database On MSSQL

Use

DB::connection('sqlsrv2');
23 Feb
4 years ago
05 Feb
4 years ago

abhimanyusharma003 left a reply on [ L5 ] Validation

If application is large, this can lead large number of Request files which can be harder to manage then managing everything at one place. Requests rules are just array, creating new files for every new array this kind of odd, even if your rules are just one or two lines.

abhimanyusharma003 started a new conversation [ L5 ] Validation

Hello,

What is the best way to use validation in laravel 5, I have different rules for different purpose.

So what should I do, create different files in app/Http/Requests like

  • ArticleCreateRequest.php
  • ArtcileUpdateRequest.php
  • ArticleDeleteRequest.php
  • UserCreateRequest.php
  • UserUpdateReuqest.php

and so or

Or is it possible I can create single file like ArticleReuqest.php and can provide different rules for different purpose.

At the current moment I'm using validator ( Validator service ) which extends validator in which pass different rules for different purpose in single file based on Model.

26 Dec
4 years ago

abhimanyusharma003 left a reply on Adding Php And Nginx Settings To Homestead

Try these

vagrant up
vagrant ssh
sudo vi /etc/php5/fpm/php.ini

Search the values you want to modify and edit them, save the file and restart both PHP and nginx

25 Dec
4 years ago

abhimanyusharma003 left a reply on Group Posts By Date

+1 to second solution this is just awesome. I tried the first one but uksort give error that expects parameter to be array, object given. After using ->toArray(); it works perfectly well.

abhimanyusharma003 left a reply on Group Posts By Date

@pmall Many thanks for this :)

You missed ->toArray(); in the end.

$posts = Post::all()->groupBy(function($item){ return $item->created_at->format('d-M-y'); })->toArray();

abhimanyusharma003 left a reply on Homestead And Redirect::route()

This is strange, just for test see what happen when you do.

return Redirect::to('/');

or

dd(route('home'));

abhimanyusharma003 left a reply on Group Posts By Date

@RachidLaasri I want to order posts by dates of months by grouping them. Like here https://laravel-news.com/archive/

On December 2014 you have 6 posts then on November 2014 you have 5 posts and so on. ( Here grouping is done by months, I want to group by dates )

I can't use orderBy() on a collection, it throws error.

Please if you any other suggestion let me know.

abhimanyusharma003 started a new conversation Group Posts By Date

I want to group posts by each day and order them like a calendar for creating a blog archive.

If I use this

Post::all()->groupBy(function($date) {
        return \Carbon\Carbon::parse($date->created_at)->format('d-M-y');
    });

I get output something like this, for sure posts are grouped according to dates, but dates itself are not properly ordered like calander, they are random.

Current output Random order of dates

Alt text

Expeted output Dates are properly ordered from current date to older dates

Example https://laravel-news.com/archive/

23 Dec
4 years ago

abhimanyusharma003 left a reply on Php DataTables Date Format

$data->created_at->toDateTimeString();

abhimanyusharma003 left a reply on Php DataTables Date Format

Use Carbon class

abhimanyusharma003 started a new conversation Blackfire On Homestead

I have updated the laravel homeated box to v0.2.2 which comes with https://blackfire.io

I run

sudo blackfire-agent -register

Then provide my server id and key, also installed it's chrome extension.

But i'm getting error ( as soon as I hit profile button on chrome extension )

"Are you authorized to profile this page? Probe not found or invalid signature."

I'm not sure what's wrong, I think I missed something.

How can I resolve this issue.

Thanks

22 Dec
4 years ago

abhimanyusharma003 left a reply on HTMLPurifier In Laravel 5

@ludo237 sometime you allow your site users to use HTML tags like bold, italics in that case this will comes handy, because you don't want escape all the html tags using e()

21 Dec
4 years ago

abhimanyusharma003 left a reply on Git Vulnerability Announced: Update Your Git Clients

@bashy why GitLab not BitBucket any specific reason or just because you can add unlimited number of team members there.

abhimanyusharma003 left a reply on Is There A Point To Using Homestead When Running Ubuntu 14 ?

If you are using VM's then you can benchmark your applications in better way and get more accurate results of memory consumption.

You can easily limit RAM and number of cpus cores you want to give to your application, with homestead. Which is not easy to do when you are using ubuntu directly.

That is you are making development == production, both in amount of hardware and software terms

20 Dec
4 years ago

abhimanyusharma003 left a reply on Segmentation Fault Composer Install, Composer Not Generate Autoload

Try

composer dump-autoload

and then composer update

19 Dec
4 years ago

abhimanyusharma003 left a reply on @foreach Ans Shuffle

What if we want to shuffle after a time period of 5 minutes ?

Before this, keep on displaying same content.