RoboRobok

RoboRobok

Member Since 4 Years Ago

Experience Points
25,900
Total
Experience

4,100 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
16
Lessons
Completed
Best Reply Awards
29
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 6
25,900 XP
Jan
17
1 week ago
Activity icon

Replied to FormRequest Not Generating Error Messages

Your protected function prepareForValidation() misses the return - maybe that's why?

Activity icon

Replied to Access Laravel Array

I would say rather:

<td>{{ $totals[0]['CURRENT'] }}</td>
<td>{{ $totals[0]['PRIOR'] }}</td>
<td>{{ $totals[0]['FULL'] }}</td>
Activity icon

Awarded Best Reply on Laravel 5.5 Controller

Make sure that:

  • your controller is in /app/Http/Controllers/Superadmin/CountryController.php
  • the class is in the namespace App\Http\Controllers\Superadmin
  • the class is defined as class CountryController
Activity icon

Replied to FormRequest Not Generating Error Messages

Does your session work correctly?

Activity icon

Replied to Laravel 5.5 Controller

Make sure that:

  • your controller is in /app/Http/Controllers/Superadmin/CountryController.php
  • the class is in the namespace App\Http\Controllers\Superadmin
  • the class is defined as class CountryController
Activity icon

Replied to Phone Formatting Issue

You are simply getting it formatted too many times. You should work on some sort of raw format (digits only) and format it for displaying.

Jan
16
1 week ago
Activity icon

Replied to Given Table Name, Get The Associated Model

First of all, make sure you need it. Table name shouldn't be used as data, unless you need it to do something about the table itself.

If you really need it, your best deal is to go through all files in /app folder, resolve model's namespace via filename and then call (new $modelName)->getTable(). Do it while the result doesn't match what you're looking for.

Activity icon

Replied to Why My Laravel On Delete Cascade Is Not Working?

Please think about it, buddy. Are you expecting the parent to be deleted when you delete the child? That wouldn't make any sense, would it? You need t delete the payment to delete its child transactions. Not the prher way around.

Jan
10
2 weeks ago
Activity icon

Replied to Why Nobody Cares About Developer's Convenience?

I still don't understand where that entire "make it simple" spirit went away. I'm not gonna lie: modern web apps overwhelm me. They are not that complex as far as the end product is concerned, but the development process is a nightmare. I feel like it's 10x more complex than it should be. I feel like people blindly follow certain paths just to make it as they think they should, ending up using dozens of packages and layers that are not necessary. Web apps should not compile for 20 minutes, period. I can't imagine such a huge web app that would require compilation time like this, leave alone the fact that the ones I worked at were not even that big.

Waiting makes me mad, I really hate when my creative process is interrupted by any process that makes me wait. And all of the sudden, it's "normal". Kill me, please.

Jan
09
2 weeks ago
Activity icon

Replied to Eloquent V/s Trigger | To Update Secondary Table

I mean "miss it" as forget it that it's there, as it's not in your codebase. One day you could swap your database mechanism to something else and that new mechanism could even have the trigger equivalent missing. That's why I opt for logic inside an actual app, not in the layers in between.

Jan
08
2 weeks ago
Activity icon

Replied to Why Nobody Cares About Developer's Convenience?

I'm pretty sure we are talking about different scales here. Doing what you are saying to that build script would take probably weeks of investogation. Nobody will pay for that, unless you do it in your free time (and it will still take weeks and weeks). It's not as simple as Composer and a few node packages. That doesn't take 20 minutes. Their frontend is actually React and the backend is Python.

Activity icon

Replied to Why Nobody Cares About Developer's Convenience?

I would seriously love to see you analyzing the bulding script that takes 20 minutes and installs like thousand pieces of crap when you join a new project :)

I'm fine with multitasking. But you throw some statements that have no coverage in reality. How many times do you save and refresh when working on a task? And how do you switch to another task every single save, plus you switch where? Another task requires compiling as well. It makes no sense.

Activity icon

Replied to Why Nobody Cares About Developer's Convenience?

@bugsysha I don't judge any code here - I'm saying that it takes lots of time. Others don't agree? They don't have sense of time or what?

Also, how do you imagine "fixing" it, being a new person in the project? This builds entire project that has been in development for a few years, it's not possible for a new person to digest it. And again, that's what I mean. The complexity. Does it need to be like that?

@fylzero can you confirm, from your experience, that 25s of refreshing and 20 minutes of building means that it's poorly optimized?

Activity icon

Replied to Why Nobody Cares About Developer's Convenience?

the company goals may just have this type of tech debt at a lower priority right now

It kinda agrees to the headline of my topic, doesn't it?

I also found out that every change makes it necessary to wait 25 seconds for the project to rebuild. I don't know - if you ask me, if I was about to prepare working environment for the people I pay, I would make sure it's as fast as possible. Slow refresh times really drive me crazy, it's virtually impossible to work efficiently when you need to progressively test a few things one by one. Such a waste of time and energy.

Activity icon

Replied to Eloquent V/s Trigger | To Update Secondary Table

You confuse connection with query. There is just one distinct connection being established for each request. So if you use just one database, you use just one connection.

I'm not a big fan of triggering data changes on database level, because they are easy to miss. Your application logic should, in my opinion, be define inside the application, not on the layers of your supporting software (such as database system).

Activity icon

Replied to Eloquent V/s Trigger | To Update Secondary Table

SQL Trigger is faster for sure, but I would still go with Events and using touch() method on a model.

Activity icon

Replied to Forloop @include Takes Too Much Time To Load.

Simple test: comment out the @include('webshop.product', ['product' => $product]) line and see if it's any better.

Activity icon

Replied to Why Nobody Cares About Developer's Convenience?

@braunson @fylzero @siangboon thank you guys for these responses. To be clear, my point is not to blame anybody in the company or the company itself. My point is to understand.

I believe each developer has his or her own priorities. My priority has always been the feel-good of my creations and human factor. When I work on the tools, I want them to be smooth and fun to use. When I set up a server, I want it to be as little hassle as possible. But I know these are not everyone's priorities, some developers prioritize security, modularity etc.

Still, I am truly fascinated about these 20 minutes. So in order to start work, we need to run two Terminal commands. The first one is to build the environment and that one takes ~15 minutes. It doesn't matter what has been built before, it always starts over. Then, we have another command to start the server, which serves the project on localhost under certain port. That's 5 minutes, but to run it, we need the previous one to be done. So basically, we need to follow until that first one is done, because there is no indicator when it's done. Both of these commands need to be left in the background. As soon as I stop any of those or close my Terminal, entire procedure must start over.

I sometimes feel like I'm in a wrong industry, because it really makes me confused that the workflows are being neglected. I thought the entire point of this industry (and any other) is to make money. If I cannot do anything for 20 minutes, they waste their money on me waiting. Also, computers are supposedly freakin' power machines these days, yet building a relatively simple website and its server takes 20 minutes. Something is off here.

I assume that people setting up the servers are experts and they know what they are doing. I was never too interested in that area. I can do some basic setups, but in general I find it rather a must than something I enjoy doing. There are hundreds of magical things going on with the setups and I think: wow, these guys know what they are doing. Then I find out that quirky workflow and the fact that it takes forever to build. I'm really, really confused.

Activity icon

Replied to Add Loader To Website While Axios Is Getting Data

@fylzero Yeah, I think it's safer to have this loading flag, instead of assuming that if data is empty when we are loading. There might be some edge cases where our data is still empty, but we already finished loading. That edge case could be some kind of unexpected error, for example.

Jan
07
2 weeks ago
Activity icon

Replied to Add Loader To Website While Axios Is Getting Data

Just put an element when you start loading data (or, alternatively, keep it in DOM all the time and just show it), and then remove it (or hide) when it's done. I don't think you need a package for that.

Activity icon

Started a new Conversation Why Nobody Cares About Developer's Convenience?

Whenever I join teams, I find it shocking how painful working environments are.

Now I work for a company probably all of you know. It's a company having a widely popular online product and mobile apps. The website is relatively small comparing to its popularity.

They have this local environment that builds freakin' 20 minutes. I mean, how is that even possible? What happens in these 20 minutes? Before it's done, it eats like 20% of my new MacBook's battery.

And it's usually like that. I join the project to find out that working on it is just pain in the a**. Why nobody cares? I don't think it needs to compile every single sh** every single time.

Are these environments so unbelievably poorly optimized, or do they really need to be this complex? 20 minutes is eternity, like you do billions and billions of computing operations in that time. And what it does is just building a freakin' website. I mean, come on...

Nov
06
2 months ago
Activity icon

Replied to Optional WHERE Statement In SQL Query

There is a cleaner way. Use when() method.

Activity icon

Started a new Conversation Sharing Homestead With The World

I'm looking for a way to share my local project with someone. Homestead offers sharing via ngrok with command:

share my-directory-name --region=eu

It works fine, but the limits are rather strict, with just 40 connections per minute. It's not enough for my project using real-time communication. I need more than 100 connections per minute.

Is there another free alternative? I found Serveo, but I'm not sure how to use it with Homestead.

I appreciate any advice.

Sep
03
4 months ago
Activity icon

Replied to How To Search Inside This Json

Great. I'm sure it will work for you then.

Activity icon

Replied to Laravel 6.0

Yeah, it doesn't even look like Laravel 5.9 to be honest. More like Laravel 5.8.1.0.

Activity icon

Replied to Book A Seance In Advance

I understand your question, but let me ask you one: isn't it possible to hire the bike 5 minutes before midnight and give it back after midnight, for example?

Activity icon

Replied to Meaning Of Cache:clear Config:clear

I'm not sure what is it that you don't understand. I assume you are a Laravel beginner, so the best path for you is to just get through the docs.

Activity icon

Replied to Is There Such Method In Collection?

Thanks! All I needed to know is that there is no built-in method in Collection.

I know the short closure syntax is coming to PHP 7.4. That wasn't the point of my question. I don't want to just simplify it no matter what, but to use built-in methods if they exist.

Activity icon

Replied to How To Search Inside This Json

So as you see, you don't work on Laravel 5.8. This whereJsonContains() method wasn't there back in 5.6, so it behaves just like whereWhatever() for you, which calls where('whatever', ...). Is it possible for you to update?

Activity icon

Replied to Is There Such Method In Collection?

My question is if the same thing can be achieved by some method of Collection via one-liner.

I'm trying to gain some fanciness here, you know...

Activity icon

Replied to How To Search Inside This Json

Can you run php artisan --version and tell me what you get?

Activity icon

Replied to How To Search Inside This Json

Can you show your code?

Activity icon

Replied to Maintenance Mode: How To Return A Json When Called /api/* Routes?

I would add a middleware checking if the app is down (app()->isDownForMaintenance()) and if it is, setting response to whatever you want.

Activity icon

Replied to How To Search Inside This Json

The link I posted is actually for Laravel 5.8. The docs design changed for all versions :)

Activity icon

Replied to Meaning Of Cache:clear Config:clear

cache:clear clears your application cache, no matter how it is configured (files, database etc.). It has nothing to do with configs.

config:clear deletes your cached config files. By default it's /bootstrap/cache/config.php. Laravel tries to read config from that file if it exists. Otherwise it reads your config from /config folder.

Activity icon

Replied to How To Search Inside This Json

Take a look here.

Activity icon

Replied to Get Group Members | Many To Many | Api | Prepare Response

And the problem is? Just set up your relations properly and then do something like:

$group = Group::find(3);
$members = $group->members()->paginate(10);
Activity icon

Replied to Laravel 6.0

Lies. It wasn't ready back when you replied but it is now :D

Activity icon

Replied to Vue Search Select With 16k + Options

Not sure about the newest trends, but I used to make this work with select2 JS library. It fetched n results from the API and injected them as the options for your <select>. In other words, you should make sure it's never too many options at once in DOM. Instead, while you type, the less and less are matching your criteria anyways.

Activity icon

Replied to How To Search Inside This Json

Your JSON is not what you want. It should be ["masterResearchDomains","masterResearchDomains2"], not ["masterResearchDomains,masterResearchDomains2"].

Activity icon

Replied to Is There Such Method In Collection?

I gave you example of the map() call doing the same thing, I still need to give you the result? Okay, so it is:

[
    {"animal": "dog"},
    {"animal": "cat"},
    {"animal": "tiger"}
]
Activity icon

Replied to How To Authenticate Incoming Requests From Node To Laravel Application Using Middleware And Passport ?

I would consider using Laravel Passport, which is just a wrapper for OAuth 2.0. The concept of expiring tokens is well-suited for app-to-app communication.

Sep
02
4 months ago
Activity icon

Replied to Show Date In The Top Bar? PHP Or JS?

PHP. Server's date is more reliable than client's date.

If you want to make it dynamic (i.e. make the clock tick), create new Date object in JS, but construct it with server's time.

Activity icon

Started a new Conversation Is There Such Method In Collection?

I need to replace each array entry to ['column' => $value]. Is there such method in Laravel's Collection?

For now I do it as:

$animals = collect(['dog', 'cat', 'tiger']);

$columnized = $animals->map(function (string $animal): array {
    return ['animal' => $animal];
});
Activity icon

Replied to Checking Both Roles & Permission At The Same Time

I mean situation when each role has their own dashboards. I understand your point and I agree that permission-driven system is better in most cases, just like feature checking is better than browser checking. But there are exceptions. Adding artificial permissions (like view_editor_dashboard) just to follow this rule is not the greatest idea. As well as checking multiple permissions to guess what is the user's context.

Activity icon

Replied to Checking Both Roles & Permission At The Same Time

In my opinion, can() is better when we want to check permission to do something, but checking entire role also makes sense in some cases. For instance, if we want to display entire dashboard area, it sometimes more sense to show/hide it through roles instead of checking individual permissions, which in theory are more dynamic.

Activity icon

Replied to Terrible Scrolling Experience On Laravel.com

I would be seriously glad to know what is the purpose of these scrolling scripts though.

Sep
01
4 months ago
Activity icon

Replied to Terrible Scrolling Experience On Laravel.com

Im talking about laravel.com, not laracasts.com.

But I do agree about the pagination.

Activity icon

Started a new Conversation Terrible Scrolling Experience On Laravel.com

As we all probably know, laravel.com changed the design recently. While I feel like its a downgrade from previous version, one feature in particular drives me nuts.

On mobile, laravel.com now delivers awful scrolling experience. All of the glide is gone in favor of some manual JavaScript scrolling nightmare. Its not even smooth.

Whats the point of these scripts? Whenever I find one of these on any website, Im like: nooo. Does anyone really prefer that over native scrolling?

Aug
28
4 months ago
Activity icon

Replied to Parallax Animation In Vanilla Javascript

Translate and translate3D don't work on inline elements. Set display: inline-block on your <span>s.

And as for "Hello World" not moving, it actually does :) You can see that it doesn't scroll along with the window, because it translates proportionally to vertical scroll position, giving the position: fixed effect. Try changing data-rateX="1" to something else and you will see it moving.