realtebo

realtebo

Member Since 3 Years Ago

Experience Points
13,320
Total
Experience

1,680 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
89
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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 3
13,320 XP
Nov
26
2 days ago
Activity icon

Replied to Package Testing: When Using $this->post The Called Action Has Not Request Injected

I found the error

The mistake was in the controller.

use Illuminate\Http\Client\Request;

the right Request class to use is

use Illuminate\Http\Request;
Activity icon

Started a new Conversation Package Testing: When Using $this->post The Called Action Has Not Request Injected

In my package, i'm doing this to simulate posting of a new image

        Storage::fake('image_upload');

        $fake_image = UploadedFile::fake()->image('photo1.jpg');

        $response = $this->post(route('package.product-image.upload'), [
            'file' => $fake_image
        ]);

        $response->assertStatus(200);

The called controller, part of this package, is trying to simply do this

use Illuminate\Http\Client\Request;

....

    public function upload(Request $request)
    {
        return "Ciao";
    }

...

I receive this error

Illuminate\Contracts\Container\BindingResolutionException : Unresolvable dependency resolving [Parameter #0 [ <required> $request ]] in class Illuminate\Http\Client\Request

There is something to do to be able to call $this->post from a package test?

Note: my test class is extending a TestCase which is extending OrchestraTestCase as suggested in documentation

Activity icon

Replied to Package Test: Could Not Find Driver For SQLite - (Laravel 8 - Windows 10)

Solved !

I installed extension sqlite but forgot to install not the extension pdo-sqlite.

After installing both all works.

Activity icon

Started a new Conversation Package Test: Could Not Find Driver For SQLite - (Laravel 8 - Windows 10)

I am developing a package using latest laravel 8.x. In on a windows 10 machine.

I am trying to create tests. I start tests in this way

C:\php-7.3.18-Win32-VC15-x64\php.exe C:/progetto/packages/product_image/vendor/phpunit/phpunit/phpunit --configuration C:\progetto\packages\product_image\phpunit.xml 

In the .xml I configured

    <php>
        <server name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
        <server name="DB_CONNECTION" value="sqlite"/>
        <server name="DB_DATABASE" value=":memory:"/>
    </php>

Test crashed saying me

Illuminate\Database\QueryException : could not find driver (SQL: PRAGMA foreign_keys = ON;)

C:\progetto\packages\product_image\vendor\laravel\framework\src\Illuminate\Database\Connection.php:671
C:\progetto\packages\product_image\vendor\laravel\framework\src\Illuminate\Database\Connection.php:631
C:\progetto\packages\product_image\vendor\laravel\framework\src\Illuminate\Database\Connection.php:465
C:\progetto\packages\product_image\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php:313
C:\progetto\packages\product_image\vendor\laravel\framework\src\Illuminate\Database\SQLiteConnection.php:37

Looking at stack trace I noticed that is using SQLiteConnection. So I think .xml configs are correct.

So I asked my php to dump infos.

C:\php-7.3.18-Win32-VC15-x64\php.exe -i

Here I can see sqlite3 extension loaded.

sqlite3

SQLite3 support => enabled
SQLite Library => 3.28.0

Directive => Local Value => Master Value
sqlite3.defensive => 1 => 1
sqlite3.extension_dir => no value => no value

What am I doing wrong?

Nov
10
2 weeks ago
Activity icon

Commented on Macro It Up

This course is outdated. For Laravel 8 is a lot different what you must do, but, of course, IS NOT difficult to upgrade but SIMPLY a lot different

Oct
28
1 month ago
Activity icon

Replied to Is There Any Theoretical Guide For Laravel Testing?

I appreciate your reply.

I am looking for a less-practical and more theoretical course.

I woul give a chance to each 3 of these, but I need infos about how to evaluate what and how to test and not about doing specific testing with phpunit or something else. My dubt is how to choose phpunit vs cypress, for example, and about each testing strategies what are specific pros and cons.

When to do unit tests and when to do e2e ? etc....

Activity icon

Started a new Conversation Is There Any Theoretical Guide For Laravel Testing?

I'm looking for first time at world of testing, and I am working to a Laravel project, of course.

I have read basic from docs, and some tutorials, about creating testing, assertions, preparations and so on but I am here to kindly ask you to point me to a course [paid], or a book [paid] dedicated to testing a laravel app.

Possibily, a need a bit of theory. For example: difference from unit test and feature test and how to test a vuejs+laravel app.

When to test models ? How to test complex integrations ? And so on.

Jul
31
3 months ago
Activity icon

Replied to Egulias\EmailValidator\EmailValidator Does Not Exist

I have now the same problem.

Laravel is trying to include this file

include(/var/www/html/project/vendor/composer/../egulias/email-validator/EmailValidator/EmailValidator.php): failed 

This file doesn' exists

egulias/email-validator/EmailValidator/EmailValidator.php

But exists

egulias/email-validator/src/EmailValidator.php

What's the source of this problem?

It gave me this on stage server, a debian 10, but not on dev server, identical debian 10

Note: on the server, classMap of composer is right

'Egulias\EmailValidator\EmailValidator' => $vendorDir . '/egulias/email-validator/src/EmailValidator.php',

What damn is happening?

Jul
24
4 months ago
Activity icon

Replied to Is There Any Laravel Theme With Datatable FULLY Integrated?

@michaloravec

Thanks for your reply.

I have not sot little difficulties to fully 100% apply theme styles to datatable search boxes, buttons, paginators, tooltips, etc

It's this the reason because I'm looking for a fully integrated theme. I discovered googling the work of creative tim that is placed at 149$ but it's very easy to use because it install itselfs via composer and the tedious work to rewrite some fews.

@van1310

I will look to your suggestione, thanks !

Activity icon

Started a new Conversation Is There Any Laravel Theme With Datatable FULLY Integrated?

I am looking for a Laravel them with Datatable integrated. But fully integrated, with an example of pagination, search, filters, exporting etc.

I still haven't found a theme with this features.

Actually, for knowledge, my preferred theme is the material admin by creative time. But it has not datatable and i'd like an already integrated theme....

Jul
23
4 months ago
Activity icon

Replied to How To Output An Image Directly From A Route?

I understand, but the ping is dynamic [is acting like a qr+pixel tracking]

Activity icon

Started a new Conversation How To Output An Image Directly From A Route?

Is it possible to create a route like '/profile-picture' and serve a .png from the server?

I dont'see any info on docs about a response of type 'image', or 'png', or similar

Jul
22
4 months ago
Activity icon

Replied to How To Use Count Of Relations Where Building A Query?

Yes, and you? :)

It doesn't works because it caus an bovious SQL error about orders_count being not in tha table

Activity icon

Started a new Conversation How To Use Count Of Relations Where Building A Query?

I have this query [for datatable]

$records = Customer::select('id', 'name', 'surname', 'email', 'phone')
            ->where(function($query) use ($searchValue) {
                $query->where('name', 'like', '%' .$searchValue . '%')
                    ->orWhere('surname', 'like', '%' .$searchValue . '%')
                    ->orWhere('email', 'like', '%' .$searchValue . '%')
                    ->orWhere('phone', 'like', '%' .$searchValue . '%')
                ;
            })
            ->orderBy($columnName,$columnSortOrder)
            ->skip($start)
            ->take($rowperpage)
            ->get();

$data_arr= CustomerResource::collection($records);

Now I added to Customer class the 1 to many relation

public function orders()
    {
        return $this->hasMany(Order::class);
    }

I ask you how to get in the previous query the 'orders_count'

I tried added ::withCount('orders') but it do not append anything to returned results

To understand what is happening, I used tinker

>>> $customer = Customer::withCount('orders')->find(1);
=> App\Customer {#4129
     id: 1,
     email: "[email protected]",
     name: "Charlene 3",
     surname: "Sauer 3",
     phone: "520.390.6116 x2383-2",
     created_at: "2020-07-21 13:39:55",
     updated_at: "2020-07-22 14:27:52",
     deleted_at: null,
     orders_count: 8,
   }

This works !

But the following doesn't work anymore

>>> $customer = Customer::withCount('orders')->select('id', 'name', 'surname', 'email', 'phone')->take(1)->get();
=> Illuminate\Database\Eloquent\Collection {#3911
     all: [
       App\Customer {#4127
         id: 1,
         name: "Charlene 3",
         surname: "Sauer 3",
         email: "[email protected]",
         phone: "520.390.6116 x2383-2",
       },
     ],
   }

What's the trick ?!

Actually I worked around removing the select, but I really need it !

Jun
18
5 months ago
Activity icon

Replied to How To Increase Timeout For Sending Mail Via Smtp?

In mail.php there a lot of entry, but not timeout.

Do you know what should be the default value and/or how much to increase it?

EDIT: sorry, it's a laravel 6.x project, not a 5.8

Jun
16
5 months ago
Activity icon

Started a new Conversation How To Increase Timeout For Sending Mail Via Smtp?

I've a project using Laravel 5.8. [NOT TRUE: IT'S V 6.X]

My method of sending is smtp, using a smtp of microsoft .

I got a LOT of timeouts, so, while waiting for a microsoft official reply, I'd like to simply increase the timeout... but how !?