sergionader

sergionader

Member Since 1 Year Ago

Experience Points
12,180
Total
Experience

2,820 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
109
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 3
12,180 XP
Sep
19
1 month ago
Activity icon

Replied to Validation: Class Users Does Not Exist

Hey @janosk

I am reading the link you sent. Yes, I have "laravel-doctrine/orm": "1.4.*", on my composer.json. I don't remember installing it though.

Guess what? I removed it and now the unique rule works. I am checking the app to see if not having laravel-doctrine will cause any problem.

Thank a LOT!!!!!!!!

Sergio

Activity icon

Replied to Validation: Class Users Does Not Exist

Hey guys!

Here is a snippet - the whole method contains some unrelated code.

// First I get the requests from the form and assign them the the respective vars: $name, $email, etc...
// 

$rules = [
    'email'     => 'required|email|unique:users,email',
    'name'      => 'required|min:8',
    'password'  => 'required|string|min:8|confirmed|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#[email protected]$%^&*-]).{6,}$/',                        
];

$request->validate($rules) ;
$user = new User([
    'name'              => $name,
    'email'             => $email,
    'title'             => $title,
    'show_on_clients'   => $show_on_clients,
    'is_active'         => $is_active, 
    'commission_rate'   => $commission_rate,
    'password'          => $password
]);

@janosk

You might try to temporarly remove the unique rule from the email to narrow down the possibilities.

I did and without the unique rule it works.

Are you sure you ran your migrations and have the corresponding db table and column?

Yes, i am sure. Here is the table desc:

  desc users;     
                                                                                                           
+-----------------+------------------+------+-----+---------+----------------+
| Field           | Type             | Null | Key | Default | Extra          |
+-----------------+------------------+------+-----+---------+----------------+
| id              | int(10) unsigned | NO   | PRI | <null>  | auto_increment |
| name            | varchar(255)     | NO   |     | <null>  |                |
| email           | varchar(255)     | NO   | UNI | <null>  |                |
| password        | varchar(255)     | NO   |     | <null>  |                |
| remember_token  | varchar(100)     | YES  |     | <null>  |                |
| created_at      | timestamp        | YES  |     | <null>  |                |
| updated_at      | timestamp        | YES  |     | <null>  |                |
| deleted_at      | datetime         | YES  |     | <null>  |                |
| title           | varchar(40)      | YES  |     | <null>  |                |
| show_on_clients | tinyint(1)       | YES  |     | <null>  |                |
| is_active       | tinyint(1)       | YES  |     | <null>  |                |
| avatar          | varchar(100)     | YES  |     | <null>  |                |
| file            | varchar(100)     | YES  |     | <null>  |                |
| commission_rate | double           | NO   |     | 0       |                |
| sales_type      | varchar(10)      | YES  |     | <null>  |                |
+-----------------+------------------+------+-----+---------+----------------+

Also, this system is in production and has several users.

Thanks in advance!

Sep
17
1 month ago
Activity icon

Replied to Validation: Class Users Does Not Exist

Thanks, @ashraam

I had tried i as well. It keeps showing the same error.

 ReflectionException (-1)
Class users does not exist

Any other idea?

Activity icon

Started a new Conversation Validation: Class Users Does Not Exist

Hey!

I have some rules in my controller (I also tried using a form request and result is the same):

UserController

use App\User;
.....
       $rules = [
           'email'     => 'required|email|unique:users', 
           'name'      => 'required|min:8',
           'password'  => 'required'            
       ];

The table users exist as well as the field email.

Name and password rules work fine. The email rule throws this error:

ReflectionException (-1)
Class users does not exist

Any suggestions?

TIA!!!

Sergio

Aug
18
2 months ago
Activity icon

Replied to Post Route Gets Error Saying Get Is Not Allowed....

Guys, yes, it was the last slash, before the "?".

The only thing I can't get is why it works locally. Anyway, now it's working on the server, I am all set!

Thanks a lot!

Sergio

Activity icon

Replied to Post Route Gets Error Saying Get Is Not Allowed....

Hey @Snapey and @siangboon Thanks for the replies.

I found out it happens even if you run it from postman. In other words, it has nothing to do with the ajax call. If I run ... /commissions/save_from_grid/?<ARGS> on my local, it works.

Running on the servers (staging or production), it produces the error.

All the machines are running Laravel 5.8.32

Any other ideas? As you can imagine, it's driving me crazy....

Thanks and have a nice Sunday!

Aug
17
2 months ago
Activity icon

Started a new Conversation Post Route Gets Error Saying Get Is Not Allowed....

Hello!

I have this route:

Route::post('/commissions/save_from_grid', [
    'uses' => '[email protected]',
]);

that is called from a JS ajax call:

url = "/commissions/save_from_grid/?" + args;
  $.ajax({
                            url: url,
                            method: "POST",
                            contentType: "application/json",
                            // data: args, 
                            dataType: "json",

It works perfectly on my localhost. However, both my staging and production envs report the following error.

Any insights?

Thanks!

{
    "message": "The GET method is not supported for this route. Supported methods: POST.",
    "exception": "SymfonyComponentHttpKernelExceptionMethodNotAllowedHttpException",
    "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php",
    "line": 256,
    "trace": [
        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php",
            "line": 242,
            "function": "methodNotAllowed",
            "class": "IlluminateRoutingRouteCollection",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php",
            "line": 176,
            "function": "getRouteForMethods",
            "class": "IlluminateRoutingRouteCollection",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 634,
            "function": "match",
            "class": "IlluminateRoutingRouteCollection",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 623,
            "function": "findRoute",
            "class": "IlluminateRoutingRouter",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 612,
            "function": "dispatchToRoute",
            "class": "IlluminateRoutingRouter",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 176,
            "function": "dispatch",
            "class": "IlluminateRoutingRouter",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 30,
            "function": "IlluminateFoundationHttp{closure}",
            "class": "IlluminateFoundationHttpKernel",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/nova/src/Http/Middleware/ServeNova.php",
            "line": 26,
            "function": "IlluminateRouting{closure}",
            "class": "IlluminateRoutingPipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "Laravel
ovaHttpMiddlewareServeNova",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "IlluminatePipeline{closure}",
            "class": "IlluminatePipelinePipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php",
            "line": 58,
            "function": "IlluminateRouting{closure}",
            "class": "IlluminateRoutingPipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "BarryvdhDebugbarMiddlewareInjectDebugbar",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "IlluminatePipeline{closure}",
            "class": "IlluminatePipelinePipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/fideloper/proxy/src/TrustProxies.php",
            "line": 57,
            "function": "IlluminateRouting{closure}",
            "class": "IlluminateRoutingPipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "FideloperProxyTrustProxies",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "IlluminatePipeline{closure}",
            "class": "IlluminatePipelinePipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "IlluminateRouting{closure}",
            "class": "IlluminateRoutingPipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "IlluminateFoundationHttpMiddlewareTransformsRequest",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "IlluminatePipeline{closure}",
            "class": "IlluminatePipelinePipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "IlluminateRouting{closure}",
            "class": "IlluminateRoutingPipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "IlluminateFoundationHttpMiddlewareTransformsRequest",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "IlluminatePipeline{closure}",
            "class": "IlluminatePipelinePipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "IlluminateRouting{closure}",
            "class": "IlluminateRoutingPipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "IlluminateFoundationHttpMiddlewareValidatePostSize",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "IlluminatePipeline{closure}",
            "class": "IlluminatePipelinePipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php",
            "line": 62,
            "function": "IlluminateRouting{closure}",
            "class": "IlluminateRoutingPipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 163,
            "function": "handle",
            "class": "IlluminateFoundationHttpMiddlewareCheckForMaintenanceMode",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "IlluminatePipeline{closure}",
            "class": "IlluminatePipelinePipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 104,
            "function": "IlluminateRouting{closure}",
            "class": "IlluminateRoutingPipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 151,
            "function": "then",
            "class": "IlluminatePipelinePipeline",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_appvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 116,
            "function": "sendRequestThroughRouter",
            "class": "IlluminateFoundationHttpKernel",
            "type": "->"
        },

        {
            "file": "/var/www/htmlmy_apppublic/index.php",
            "line": 55,
            "function": "handle",
            "class": "IlluminateFoundationHttpKernel",
            "type": "->"
        }
    ]
}
Jul
08
3 months ago
Activity icon

Replied to SSH

Thanks a lot, @bobbybouwmann!

Activity icon

Started a new Conversation SSH

Hi, guys!

I was searching for a way to access a remote DB via SSL and stumbled upon this post: https://laracasts.com/discuss/channels/general-discussion/connect-to-remote-mysql-database-via-ssh-tunnel

However, I could not find any recent documentation for the SSH::..... class. The best I found was https://laravel.com/docs/4.2/ssh

I also found this: https://laracasts.com/lessons/laravel-remote-component

I also tried php artisan to see if there is something like make:remote with no success.

Is the remote component still valid? Suggestions?

Thanks

Sergio Nader

May
04
5 months ago
Activity icon

Replied to Laravel Vue Datatables

Thanks, Robstar. I will take a close look at them.

I tested https://www.jqwidgets.com/vue-components-documentation/documentation/jqxgrid/vue-grid-getting-started.htm?search= ? using their jquery version in a Laravel app and it worked well. I will am now testing how it behaves with a table with hundreds of thousands of records: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-php-server-side-processing.htm

Regardless, I do like the way Laravel handles the pagination by itself out of the box. For basic tables and searches, Laravel works very well by itself.

Best,

Sergio

May
03
5 months ago
Activity icon

Started a new Conversation Laravel Vue Datatables

Hey!

I am looking for Vue Datatables components.

Does anyone have any experience to share?

Any experience with https://www.jqwidgets.com/vue-components-documentation/documentation/jqxgrid/vue-grid-getting-started.htm?search= ?

... or with https://github.com/laravel-enso/Enso ?

Any other suggestion?

Thanks in advance!

Sergio