theblack68

theblack68

Member Since 3 Years Ago

Cassano Magnago

Experience Points
15,210
Total
Experience

4,790 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
139
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.

Level 4
15,210 XP
Aug
12
3 months ago
Activity icon

Replied to Ubuntu Public/Images Not Load Image

Sorry to everyone ...I have set in the controller (public function store) a strtoupper($request->image).

But in the folder the name was lowerCase ;(

.jpg >>> .JPG and works ...sorry again!

Activity icon

Started a new Conversation Ubuntu Public/Images Not Load Image

Hi!

I have load from Local to WebServer (Virtual machine with Ubuntu 16.04) my Laravel Project.

All works fine but I can't load the image from public/images/certificate.

Example {{ asset('/images/certificate/' . $info->pivot->valore) }} ...not works.

I have try with {{ url('') }}

I have try with {{ public_path }} ...nothing.

Some help please?

Thanks

Aug
10
3 months ago
Activity icon

Replied to Difficolt Query

Hey @aurawindsurfing

I have resolved so:

  • I get with in_array the only features that I want by their ID (5, 6, 7, 8)

  • With array_column I have set the Key with the ID of Feature

  • And finally I check the Key with the Isset ...so If isset I show the value else I show a "-"

...I don't know if is the right way but works good!

Thanks ;)

Activity icon

Replied to Difficolt Query

HEY @aurawindsurfing

So when I create or update records in the table cable_feature even if they don't have that feature I have to set it to null?

Aug
09
3 months ago
Activity icon

Replied to Difficolt Query

Hey @aurawindsurfing

Maybe you can help me ;(

I have 3 tables in database >>> with a many to many relationship:

  • cables

  • feature

  • cable_feature

I have 2 Model (I have set a public function belongsToMany):

  • Cable

  • Feature

I have a controller for send data to View

In this view I have a table >>> I get some value from a controller (Cable name >>> cable family and so on).

My problem are the column of the feature >>> I need to have 4 feature:

  • Voltage

  • ColorType

  • Pvc

  • Shield

Not all the cables have all 4 features so I need to let Empty if the feature are not set ...you can give me an Help please?

Example:

[cable] [voltage] [ColorType] [Pvc] [Shield]

[cable12] [450 Volt] [red] [empty] [empty]

[cable13] [480 Volt] [empty] [Yes] [Yes]

Thanks a lot ;)

Aug
05
3 months ago
Activity icon

Replied to Difficolt Query

First of all thanks for the help that you give me.

Explanation: I have write in italian (Cavi = Cables | Features = Caratteristiche)

I have resolved with a bit of code but I think is not a good super-solution (but works ;) )

The Maatwebsite/Excel package give you the ability to build $data to export. I have build all so:

$cavi = Cavo::with('famiglia', 'caratteristiche')->get();

        return $cavi->map(function($cavo) {
            foreach ($cavo->caratteristiche as $caratteristica) {
                if($caratteristica->id == 5 || $caratteristica->id == 7) {
                    $caratteristicheCavo[] = $caratteristica->pivot->valore;
                }
            }

            return $datiEplanArray = [
                'ParNumber' => "AGE" . $cavo->codice_articolo,
                'TypeNumber' => $cavo->famiglia->codice_articolo,
                'OrderNumber' => $cavo->codice_articolo,
                'Designation EN' => $cavo->famiglia->nome,
                'Description EN' => $cavo->famiglia->descrizione,
                'Document/Link 1' => '/ita/pdf/' . $cavo->famiglia->codice_articolo . '.pdf',
                'Description Doc. 1 EN' => '/en//pdf/' . $cavo->famiglia->codice_articolo . '.pdf',
                'ExternalDiameter / ND' => $caratteristicheCavo[1],
                'Connections / Number ' => $caratteristicheCavo[0],
                'Cable type' => $cavo->famiglia->nome,   
                'PreviewPicture' => '/immagini/' . $cavo->famiglia->immagine,
                'EDP catalogue structure level 1 EN' => 'Cavo',
            ];
        });
Aug
04
3 months ago
Activity icon

Started a new Conversation Difficolt Query

Hi! I'm new in Laravel and I need some HELPS for a QUERY.

Sorry for my English

I have 3 tables:

  • Cables (belongs_to_many Features)

  • Features (belongs_to_many Cables)

  • Cable_Feature (Pivot) with pivot extra field value

I have created for everyone a Model with a relationship _(and all works fine...)_

  • The structure of Table Cables is (Id, Code)

  • The structure of Table Features is (Id, Name)

  • The structure of Pivot Table Cable_Feature is (cable_id, feature_id, value)

Now I need to build a query (to export in Excel with Maatwebsite/Excel). I need that every record have:

  • Cables.Code

  • Feature.Name

  • Value

I'm able to do it but my problem is that I need to have all on one line ...ES: Assume that we have 3 cables and 2 features. in database

Cables:

  • (id) 1, (code) 0031TN

  • (id) 2, (code) 0042GG

  • (id) 3, (code) 0025ZS

Features:

  • (id) 1, (name) PVC

  • (id) 2, (name) CM

And the situation in Cable_Feature is:

  • 1 - 1 - High Quality

  • 1 - 2 - 12

  • 2 - 1 - High Quality

  • 2 - 2 - 6

  • 3 - 1 Low Quality

  • 3 - 2 -11

Now I need to become with a query this result (1 for row)

  • 0031TN - High Quality - 12

  • 0042GG - High Quality - 6

  • 0025ZS - Low Quality - 11

Someone can help me please? ...thanks a lot!

Jul
17
4 months ago
Activity icon

Replied to Ignore Composite Key With Validation Rules

I have read but I need an Help ;(

this is a Controller that get the request (famiglia and info)

    public function updateInfoTecnica(UpdateAssociafamiglia $request)
    {
        $famiglia = Famiglia::find($request->input('famiglia'));
        $info_id = $request->input('info');

        $famiglia->info()->attach([$info_id => [
            'valore' => $request->input('valore')
            ]
        ]);

        return redirect('famiglie/' . $famiglia->id)->with('ok_message', 'Info Tecnica modificata con Successo');
    }

This is a Validation Request (but not work...)

public function rules()
    {
        return [
            'info' => [
                'required',
                Rule::unique('famiglia_info','info_id')
                    ->ignore($this->famiglia, 'famiglia')
                    ->where(function ($query) {
                        $query->where('famiglia_id', $this->request->get('famiglia'));
                })
            ],
            'valore' => 'required'
        ];
    }
Activity icon

Started a new Conversation Ignore Composite Key With Validation Rules

Hi! I'm try to validate in a Request (UpdateAssociafamiglie) a composite Key.

How I can ignore 2 fields?

My Pivot Table have 2 fields (famiglia_id, info_id), when update a record I get an error of a Costraint Violation (duplicate record).

I know how use ignore but only for 1 field ...how can ignore famiglia_id and info_id in one shot?

thanks ;)