veerendra

veerendra

Member Since 3 Years Ago

Experience Points 640
Experience Level 1

4,360 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 5
Lessons
Completed
Best Reply Awards 0
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.

26 Apr
3 years ago

veerendra left a reply on Json Column Problem With Mysql5.7 And Laravel5.2

I managed in this way

AdminLoginHistory::select(\DB::raw("CAST(client_details as CHAR) as client"), 'created_at', 'url')->orderBy('id', 'desc')->paginate(5);

29 Mar
3 years ago

veerendra left a reply on Laravel 5 - Dompdf Doesn't Work - Any Fix There?

$pdf->loadView('pdfs.qpdf', $data);

The error tells that you dont have html view page(pdfs.qpdf) in your laravel application.try to add a html view page then error rectifies.

26 Mar
3 years ago

veerendra started a new conversation Incremental Order For Version Wise

How to get the incremental,order column in mysql?

Currently mysql table consist of data like this

id  version_number  desc
1    1.0            somedesc
2    1.0            somedec1
3    1.2            somedesc2
4    1.2            somedesc2
5    1.2            somedesc2

but i want to get the results as below

id  version_number  desc        v_n
1    1.0            somedesc     1
2    1.0            somedec1     1
3    1.2            somedesc3    2
4    1.2            somedesc4    2
5    1.2            somedesc5    2

For every unique version_number,the v_n must be equal.for example: 1.0 version_number,the v_n must be 1.similarly for 1.2 version the v_n must be 2 and so on.if a new version 1.0.1 is inserted and the value is in between 1.0 and 1.2 then v_n of 1.0 is 1,v_n of 1.0.1 must be 2 and v_n of 1.2 must be 3.This change must be done automatically when new row is inserted.

Every version_number should have a v_n uniquely like every version_number that has 1.0 should have a value of 1 in v_n but these v_n number is incremental number depending on the version_number in asc order. And desc column can be whatever not a problem with that column.

25 Mar
3 years ago

veerendra left a reply on Json Column Problem With Mysql5.7 And Laravel5.2

The query is executing successfully in phpmyadmin.But when using in laravel 5.2 getting error.

$values=DB::table('admin_login_history')->where('user_id',1)->orderBy('created_at','desc')->take(3)->get();

The above query gets error when retrieving the values from table.The table contains one json column which is newly used in mysql5.7 and laravel 5.2.

But when querying the results without selecting the json column, the query retrieving the results.the problem is with json column.

example:
$values=DB::table('admin_login_history')->select('id')->where('user_id',1)->orderBy('created_at','desc')->take(3)->get();

This executes successfully and retrieving results.

The main problem is with json column type.iam using laravel 5.2 and mysql5.7

22 Mar
3 years ago

veerendra left a reply on Json Column Problem With Mysql5.7 And Laravel5.2

my error trace

File Path: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Database/Connection.php
Error Code:HY000,  Line Number:669
Message:SQLSTATE[HY000]: General error: 2036 (SQL: select * from `admin_login_history` where `user_id` = 1 order by `created_at` desc limit 3)
                                                                                                                            Trace

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Database/Connection.php
Line:629,  Function:runQueryCallback,  Class:Illuminate\Database\Connection,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Database/Connection.php
Line:342,  Function:run,  Class:Illuminate\Database\Connection,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
Line:1461,  Function:select,  Class:Illuminate\Database\Connection,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
Line:1447,  Function:runSelect,  Class:Illuminate\Database\Query\Builder,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
Line:569,  Function:get,  Class:Illuminate\Database\Query\Builder,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
Line:303,  Function:getModels,  Class:Illuminate\Database\Eloquent\Builder,

File: /home/storage/elivio/InvizoAdmin/app/Http/Controllers/HomeController.php
Line:38,  Function:get,  Class:Illuminate\Database\Eloquent\Builder,

File: - - -
Line:- - -,  Function:profile,  Class:App\Http\Controllers\HomeController,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Controller.php
Line:80,  Function:call_user_func_array,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
Line:146,  Function:callAction,  Class:Illuminate\Routing\Controller,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
Line:94,  Function:call,  Class:Illuminate\Routing\ControllerDispatcher,

File: - - -
Line:- - -,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\ControllerDispatcher,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:52,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/app/Http/Middleware/Authenticate.php
Line:44,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: - - -
Line:- - -,  Function:handle,  Class:App\Http\Middleware\Authenticate,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:124,  Function:call_user_func_array,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Pipeline\{closure},  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:32,  Function:call_user_func,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:103,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
Line:96,  Function:then,  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
Line:54,  Function:callWithinStack,  Class:Illuminate\Routing\ControllerDispatcher,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Route.php
Line:174,  Function:dispatch,  Class:Illuminate\Routing\ControllerDispatcher,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Route.php
Line:140,  Function:runController,  Class:Illuminate\Routing\Route,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Router.php
Line:724,  Function:run,  Class:Illuminate\Routing\Route,

File: - - -
Line:- - -,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Router,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:52,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php
Line:49,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: - - -
Line:- - -,  Function:handle,  Class:Illuminate\View\Middleware\ShareErrorsFromSession,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:124,  Function:call_user_func_array,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Pipeline\{closure},  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:32,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php
Line:62,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: - - -
Line:- - -,  Function:handle,  Class:Illuminate\Session\Middleware\StartSession,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:124,  Function:call_user_func_array,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Pipeline\{closure},  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:32,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php
Line:37,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: - - -
Line:- - -,  Function:handle,  Class:Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:124,  Function:call_user_func_array,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Pipeline\{closure},  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:32,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php
Line:59,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: - - -
Line:- - -,  Function:handle,  Class:Illuminate\Cookie\Middleware\EncryptCookies,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:124,  Function:call_user_func_array,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Pipeline\{closure},  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:32,  Function:call_user_func,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:103,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Router.php
Line:726,  Function:then,  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Router.php
Line:699,  Function:runRouteWithinStack,  Class:Illuminate\Routing\Router,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Router.php
Line:675,  Function:dispatchToRoute,  Class:Illuminate\Routing\Router,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
Line:246,  Function:dispatch,  Class:Illuminate\Routing\Router,

File: - - -
Line:- - -,  Function:Illuminate\Foundation\Http\{closure},  Class:Illuminate\Foundation\Http\Kernel,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:52,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/barryvdh/laravel-debugbar/src/Middleware/Debugbar.php
Line:49,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: - - -
Line:- - -,  Function:handle,  Class:Barryvdh\Debugbar\Middleware\Debugbar,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:124,  Function:call_user_func_array,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Pipeline\{closure},  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:32,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php
Line:44,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: - - -
Line:- - -,  Function:handle,  Class:Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:124,  Function:call_user_func_array,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Pipeline\{closure},  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php
Line:32,  Function:call_user_func,  Class:----,

File: - - -
Line:- - -,  Function:Illuminate\Routing\{closure},  Class:Illuminate\Routing\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
Line:103,  Function:call_user_func,  Class:----,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
Line:132,  Function:then,  Class:Illuminate\Pipeline\Pipeline,

File: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
Line:99,  Function:sendRequestThroughRouter,  Class:Illuminate\Foundation\Http\Kernel,

File: /home/storage/elivio/InvizoAdmin/public/index.php
Line:54,  Function:handle,  Class:Illuminate\Foundation\Http\Kernel,

File: /home/storage/elivio/InvizoAdmin/server.php
Line:21,  Function:require_once,  Class:----,

veerendra started a new conversation Json Column Problem With Mysql5.7 And Laravel5.2

How to retrieve json column data from the json column type in mysql 5.7?

Here is my Eloquent model and migration

class AdminLoginHistory extends Model
{
    protected $table = 'admin_login_history';
    protected $fillable = ['file_path', 'url', 'user_id', 'client_details'];
    protected $casts = ['client_details' => 'json'];
}

Database Migration Table
  public function up()
    {
        Schema::create('admin_login_history', function (Blueprint $table) {
            $table->increments('id');
            $table->string('url');
            $table->json('client_details');
            $table->integer('user_id')->nullable();
            $table->timestamps();
        });
    }

Iam converting  array of client_details  to json and inserting in to data base.

Now,when trying to retrieve the data iam getting error

File Path: /home/storage/elivio/InvizoAdmin/vendor/laravel/framework/src/Illuminate/Database/Connection.php
Error Code: HY000, 
 Line Number: 669
Message: SQLSTATE[HY000]: General error: 2036 (SQL: select * from `admin_login_history` where `user_id` = 1 order by `created_at` desc limit 3)

Iam using laravel 5.2,php-5.6.17 and MySQL 5.7.