komalbhatt

komalbhatt

Member Since 2 Years Ago

Ahemdabad

Developer at Ahmedabad

Experience Points 4,140
Experience Level 1

860 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 1
Lessons
Completed
Best Reply Awards 5
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.

28 Feb
4 months ago

komalbhatt left a reply on Set Non Expired Session In Laravel 5.7

yes cookies is the best option!

04 Jan
6 months ago

komalbhatt left a reply on Datatable In Laravel

yup I have table with list of record

  public function index()
    {
        $this->authorize('viewClients', User::class);
        $query = $this->user
            ->pushCriteria(new WhereRelationEqual('roles', 'level', Roles::Client))
            ->pushCriteria(new WhereCurrentClient(\Auth::user()->id))
            ->pushCriteria(new WithRelation('roles'));

        // Data tables support.  Utilizes the existing query.
        if (request()->expectsJson()) {
            $query->applyCriteria();

            return DataTables::of($query->getModel())->toJson();
        }

        return view('clients.index')->with([
            'clients' => $query->paginate(),
        ]);
    }
<script type="text/javascript">
    window.$('.client-datatable').DataTable({
        ajax: '/clients',
        processing: true,
        serverSide: true,
        columns: [
            { data: 'name' },
            { data: 'email' },
            { data: 'health_card_number' },
            {
                data: 'id',
                render: function (data) {
                    var template = $('#user-actions-template').clone();
                    template.find('a,form').each(function () {
                        var element = $(this);
                        if (element.attr('href')) {
                            element.attr('href', element.attr('href').replace('USER_ID', data));
                        }
                        if (element.attr('url')) {
                            element.attr('url', element.attr('url').replace('USER_ID', data));
                        }
                    });

                    return template.html();
                }
            },
        ],
        deferRender: true,
        responsive: true,
    });
</script>

komalbhatt left a reply on Datatable In Laravel

Actually i want editing column feature in datatable .If you can requirement other packages it's totally fine for me.

komalbhatt started a new conversation Datatable In Laravel

https://editor.datatables.net/examples/inline-editing/options.html

I want this kind of datatable behavior in laravel I am using yajra/laravel-datatables-oracle package can any one help me out

26 Dec
6 months ago

komalbhatt left a reply on Eloquent Relationship From Pivot Table

public function roles() { return $this->belongsToMany('App\Models\Role', 'user_clinics', 'user_id', 'role_id'); }

03 Dec
7 months ago

komalbhatt left a reply on How To Get Array Count

``$man=explode(',', $id);

$count_man=count($man);``

komalbhatt left a reply on Count In Json

Object.keys(jsonArray).length; or `json_encode(count($return));

22 Nov
8 months ago

komalbhatt left a reply on MethodNotAllowedHttpException In RouteCollection.php Line 251:

Route::resource('users', 'UserController'); try this

14 Nov
8 months ago

komalbhatt left a reply on Display Data Relationship In Blade

@zsoltgyure is correct why things are coded is perfectly fine you need to debug using dd().

komalbhatt left a reply on Post To Controller Store From A Form Action

you can store in below mentioned way $user->properties()->create( [ 'title' => $request->get('title'), ] );

komalbhatt left a reply on How To Save Multi Array From Request

saving the data in using foreach loop is the best option

03 Sep
10 months ago

komalbhatt left a reply on How Can I Run Laravel 5.4 (Php Ver 5.6) Project Cloneing Someone, I Am Using Laravel 5.6 (php Ver 7.2)???

It won't run like this way the clone project need to be migrated to latest version of php .2 . Second solution is to use controller of clone project into laravel project 5.6 .

10 Aug
11 months ago

komalbhatt left a reply on How To Save And Display Multiple Images In In Database?

you need primary and secondary table with one to many relationship

komalbhatt left a reply on How To Convert A Table Full String Type Dates To Laravel Timestamps?

Method 1 :

  1. run a script for update respective column after changing the new table datatype as timestamp.
  2. script can use following code:
        $existingTool->last_check_date = Carbon::createFromFormat('j-M-y', $lastChecked);
    } catch (\InvalidArgumentException $e) {
            Log::debug('!! Error parsing checked date:');
            Log::debug($e->getMessage());
    } ```
check reference from here https://carbon.nesbot.com/docs/

Method 2:
1) run a script using core php coding for update respective column  after changing the new table datatype as timestamp.
2)script can use following code:

``` $dtime = DateTime::createFromFormat("d/m G:i", $stringformat);
$timestamp = $dtime->getTimestamp(); ```

Hope this helps you!
06 Aug
11 months ago

komalbhatt left a reply on Search Function Does Not Work On The Search Result Page

try to do same with GET request Route::post('/search/{name}/{year}/{language}/{review}', 'Frontend\[email protected]');

komalbhatt left a reply on Destroy Function

There are 2 ways we can handle

  1. delete first logout activity and then delete login activity.
  2. store the id in cookies and use that cookie id to delete logout activity .After deleting delete cookie. I recommend to use 2 method
03 Aug
11 months ago

komalbhatt left a reply on Increment Record In Database Without Touching Timestamp

$user = User::find(1); $user->timestamps = false; $user->age = 72; $user->save();

komalbhatt left a reply on Showing Category Name Instead Of Id

you need to have belongto etc type of relationship this will make your work easy

31 Jul
11 months ago

komalbhatt left a reply on Destroy Function

cause that $id is deleted from the table and then again queried

komalbhatt left a reply on How To Display Name From A Table Column

public function cities() { return $this->belongsTo('APP\Model\RegionModel', 'foreign_key', 'other_key'); }

try something like this

komalbhatt left a reply on How To Explode And Display The Data ?

//Controller public function index() { $projects = Project::with('user')->pluck('skill_name'); return view('freelancer.request.index',compact('projects')); } //View @if(in_array("PHP", $project)) {{ strtoupper($project->skill_name) }} @endif

komalbhatt left a reply on Auto Uploading Excel File

define custom artisan command in kernal to do that and use that command to execute as cron job https://scotch.io/@Kidalikevin/how-to-set-up-cron-job-in-laravel

komalbhatt left a reply on Any Way To Compile The Vendors Folder

exactly you will break vendor composer but, sometimes to trace the things I use print_r(<variable>) and exit() in the file so that I can get idea if some passing argument to the called function is getting wrong.

30 Jul
11 months ago

komalbhatt left a reply on ErrorException In Builder.php Line 1185:

@Xupha @Snapey actully it's bug in php 7.2 version just put condition I faced same issue in 5.6.* laravel but not in builder.php rather was in controller while migratione.g., if((is_object($posts) || is_array($posts)) && sizeof($posts)){ } so I guess you needs to downgrade php for that particular laravel version.

komalbhatt left a reply on Retrieve Data From Database Table In Descending Order

$ordered_books = OrderedBook::orderBy('id', 'DESC')->get()->toArray();

This should work for you

komalbhatt left a reply on Saving Multiple Text Input Boxes And Drop Down Values Into Mysql

I think you need to dd($items) and then exit(); right after it this will get you an idea weither actully data is posting correctly.

komalbhatt left a reply on Route Issue

Ya I agree with @Snapey whether the subdomain or main domain thing should be same.

komalbhatt left a reply on Difference Between Two Apparently Similar Queries.

filtering favorites of current logged in user first and then delete it. $lodging->favorites()->where('user_id', auth()->id())->get()->first()->delete(); get all the favorites first and then filter it to delete $lodging->favorites()->get()->where('user_id', auth()->id())->first()->delete();

komalbhatt left a reply on Language Middleware, Based On 'language_id' Integer

Yeah! I used the same method in my previous project and it worked for me .

komalbhatt left a reply on HTML To PDF/Image Conversion

Finally I got is solve by using setbinary() for custom phantomjs

29 May
1 year ago

komalbhatt started a new conversation Csv Formate Is Corrupted While Download Using Maatwebsite/excel 3.0 Packagelist

When I download csv file using maatwebsite/excel 3.0 but file is getting .txt extention append whiloe download e.g., <file_name>.csv.txt .though xlsx formate is working perfectly fine. following is my code.

*if ($request->has('format')) { switch ($request->get('format')) { case 'xls': return Excel::download($export,'ToolReportOverdueChecks'.date('Y-m-d_h:i:s').'.xls'); break; case 'xlsx': return Excel::download($export,'ToolReportOverdueChecks'.date('Y-m-d_h:i:s').'.xlsx'); break; case 'csv': return Excel::download($export,'ToolReportOverdueChecks'.date('Y-m-d_h:i:s').'.csv'); break; default: return Excel::download($export,'ToolReportOverdueChecks'.date('Y-m-d_h:i:s').'.csv'); break; } }

16 May
1 year ago

komalbhatt left a reply on Steps To Follow To Upgrade 5.6 From 5.0

thanks @ModestasV and @rin4ik can you give me optional way for declare route for 5.6

"Route::controller('/auth', 'Auth\AuthController');"

komalbhatt left a reply on Steps To Follow To Upgrade 5.6 From 5.0

@rin4ik also If I got as per your mention what step do i need to follow

komalbhatt left a reply on Steps To Follow To Upgrade 5.6 From 5.0

@rin4ik can't I directly replace all MVC in fresh 5.6?

komalbhatt started a new conversation Steps To Follow To Upgrade 5.6 From 5.0

can any one help me how to follow step wise upgrading 5.6 laravel from 5.0

15 May
1 year ago

komalbhatt started a new conversation Need To Install Already Create Project From Git In VM

I have got oracle VM and have included OVM format in it my client have already given me ssh key what next step should I follow can any one help me

26 Feb
1 year ago
24 Feb
1 year ago

komalbhatt started a new conversation Declare Userdefine Variable As Eviroment Variable

I want to define google key as environment variable so that can access it through out the project

22 Feb
1 year ago

komalbhatt left a reply on Curl Function Giving Error 60

I have solved my problem thanks for all the comments .I have made us of curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); and things worked for me Thanks @bobbybouwmann for again helping me and thanks @lostdreamer_nl

komalbhatt started a new conversation Curl Function Giving Error 60

I am setting corn job that contain use of curl function it is giving error for laravel projects only while core php project are working perfectly fine using curl . i.e., http://localhost/<file.php> - working perfectly fine for allcurl function http:// -not working curl function

12 Feb
1 year ago

komalbhatt left a reply on Getting Form Element Is Missing In Laravel 5.6?

ok thanks all , but i started working now with form tag manually

komalbhatt left a reply on I Want To Change All The User Auth?

:) uptill now no issue had face(i.e., registration,verification,mails etc) thanks for all your answers!

komalbhatt left a reply on I Want To Change All The User Auth?

ya! thanks a lot for the help it worked for me but this method in case there is some extended requirement is there it won't be an issue rgt?

komalbhatt left a reply on I Want To Change All The User Auth?

Thanks for reply @bobbybouwmann actully laravel have "php artisan make:auth" which will create user as authenctication i just want to replace tables and models of user to candidate (nameing convention). How can it be possible?

komalbhatt started a new conversation I Want To Change All The User Auth?

I want to change all the user auth to candidate auth that means table name and model controllers of auth includeing reset and forgot password how is it possible in laravel 5.6

komalbhatt left a reply on Getting Form Element Is Missing In Laravel 5.6?

@snapey I think not all basic the packages available yet for laravel 5.6 ?