TomyLimon

TomyLimon

Member Since 1 Year Ago

Experience Points 290
Experience
Level
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Answer
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.

29 Jun
5 months ago

TomyLimon left a reply on To Much Products

@rumm.an you have mistake. In your solutions it will be

Select * from company where company_id =1 and name like “%$term%” or code like “%$term%”

So as result i’ll Get all records where company_id =1 and name like “%$term%” AND All records where code like “%$term%”

But I need

Where company_id =1 And ( name like “%$term%” or code like “%$term%”)

TomyLimon left a reply on To Much Products

I try tu use this construction and it sole my problem

''' $camps = $field->camps()->where('status', 0)->where(function ($q) { $q->where('sex', Auth::user()->sex)->orWhere('sex', 0); })->get(); '''

TomyLimon started a new conversation To Much Products

Hi. I have model $company in company I have

    public function products(){
            return $this->hasMany('App\Models\Product', 'company_id');
        }

I try to use this function in

$myCompany= $company->find(1);
$myCompany->products()->where("name", "like", "%$term%")->orWhere("code", "like", "%$term%")->orderBy( "name" )->get();

As result I'm getting resut based on all records from DB, not only $myCompany products? What I did wrong?

18 Apr
7 months ago

TomyLimon left a reply on First Try

@rin4ik I went through this forum and find a solution In somename.blade.php {{ message }} not working, working @{{ message }}

TomyLimon left a reply on First Try

Can't understand what I did wrong

TomyLimon started a new conversation First Try

Hi. I want to try Vue. Take sample and run it.

My first Vue app
  • {{ item.message }}
var example1 = new Vue({ el: '#example-1', data: { items: [ { message: 'Foo' }, { message: 'Bar' } ] } })

Result

message message

29 Mar
8 months ago

TomyLimon left a reply on Getting Multiple Instances Of A Product

@Nikki Remove it from rout and in Product page you can show all productsCat and put checkbox checked for related cats

TomyLimon left a reply on Getting Multiple Instances Of A Product

You cant remove clones of product because it's different object.

in case if you can remove $category->slug from

<a href="{!! route('product.item', [$category->slug, $product->slug]) !!}">
    

it can be transformed to


@foreach($products as $product)
    $cat_slug = "";
    @foreach($product->productsCat as $category) 
        $cat_slug .= " ".$category->slug
     @endforeach 
    <?php
                $product_image = getImagesArray($product->image);
            ?>
            <div class="product_category_item {{ $cat_slug }}"> 
                <a href="{!! route('product.item', [$product->slug]) !!}">
    ...
28 Mar
8 months ago

TomyLimon left a reply on Sortable Images With JQuery Ui-sortable And Laravel

Ok. Here is a problem. You try to send information with no csrf_token

You need add csrf to your request. Add this line in your layout.blade.php header section ... ...

Add this line in your JS file $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } });

TomyLimon left a reply on Sortable Images With JQuery Ui-sortable And Laravel

Hi. Please add here your html->FORM.

20 Mar
8 months ago

TomyLimon left a reply on Redirect To The Previous Page After Registration And Login

Is it possible to get URL as a string? I need send it as JSON respons

TomyLimon left a reply on Redirect To The Previous Page After Registration And Login

Hi. Did you find solution? I have made custom Login/Registration and right now login redirect go to "home" page.

19 Sep
1 year ago

TomyLimon left a reply on MODEL->save() Error

@thomaskim Many thanks. I change function name and all fine now.

18 Sep
1 year ago

TomyLimon started a new conversation MODEL->save() Error

Hi. I have strange situation. I have model Document and problem is

$doc = Document::find(2); $doc->save();

as result I'm getting error

SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list' (SQL: update documents set 0 = {"id":4,"document_id":2,"unit_id":107,"unit_name":"Balons no komp. materi\u0101la, 6,8 l / 300bar, 30 gadi, ar AZA ventili ar av\u0101rijas nopl\u016bdes

Problem is field list in SQL is taken from different table. I can't understand how/whie....

20 Feb
1 year ago

TomyLimon left a reply on Link Not Working

@anmol Please check is some values in

Posted In:{{$post->category->name}}

$post->category is NULL and you try to get access to NULL->name.......

TomyLimon left a reply on Find Out All Logged In Users

@psychomantis101 suggested solution by @Mittensoff is good if in your system will working be some 10-30 users. In case if you have some 100 active users and each click add SQL to update user record (alive) + check for other users status SQL DB will die or your system will work slow.