andreich1980

andreich1980

Member Since 2 Years Ago

Bryansk

Experience Points
94,030
Total
Experience

970 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
766
Lessons
Completed
Best Reply Awards
24
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 19
94,030 XP
Oct
08
1 week ago
Activity icon

Commented on Form Validation Essentials

According to the laravel docs you can also use $message variable inside the @error directive

@error('title')
    <div class="alert alert-danger">{{ $message }}</div>
@enderror
Aug
27
1 month ago
Activity icon

Commented on Fetch The Most Popular Authors

Wondering what is faster - a subquery like this or the join posts?

Aug
19
2 months ago
Activity icon

Replied to Passing Boolean From Laravel Blade To Vue Component Prop

This should have been marked as the solution.

Aug
17
2 months ago
Activity icon

Commented on One-to-Many

Great new design of the video page!

Jul
27
2 months ago
Activity icon

Commented on Encapsulated UseCases

What about the methods like registerUser() and so on that would be the same for all that use cases? Should we extract it somewhere and then extend the cases with that class?

Jul
12
3 months ago
Activity icon

Commented on Inline SVGs Using Render Functions

Aren't you missing a space in the regular expression at 0:35?

I think it should be <svg title='${achievement.description}'<SPACE>

Activity icon

Replied to Connecting To Remote MSSQL Server From Homestead V7.9.0

Thanks @imni It works great.

P.S. I set DB_PORT to 1433.

Jul
09
3 months ago
Activity icon

Commented on How To Dynamically Inline SVG Files In Vue Components

Too high resolution for a video lesson. But still great approach!

Jul
02
3 months ago
Activity icon

Commented on Drop Down A Level

What kind of black magic is this?

You make 2 typos (18:30, 18:45), run tests, get green (18:49), return to the code and the typo is fixed :D (18:43, line 147)

I'm speaking about forgotten ) in two places

UPD: timestamps

Activity icon

Commented on Drop Down A Level

Haha, look for the latest Whatcha you working on lesson.

Jun
28
3 months ago
Activity icon

Commented on Be Strict With Your Controllers

Wow, nice native comments!

May
23
4 months ago
Activity icon

Replied to Help Transforming Collection

Just map through the collection and modify the result as you wish with map

UPD. Group by Month, then Map through each day of the Month-group.

Activity icon

Replied to 'Call To Undefined Method Illuminate\Database\Query\Builder::isAccount()'

Do you have the method in your User model? Could you show it?

Activity icon

Replied to Resource Links Next And Prev

RTFM, https://laravel.com/docs/5.8/pagination

There you'll see Appending To Pagination Links

{{ $users->appends(['query' => 'params'])->links() }}
May
21
4 months ago
Activity icon

Replied to Implementing 3 Types Of Users

Do they really need to be in different tables?

Maybe you can store them all in users with diferent roles. You could even create separate Models for them if you want.

May
16
5 months ago
Activity icon

Replied to How To Give Permission To Public Folder To Store Image.

You shouldn't save files to the public directory directly. Save them to the storage/app/public and make a symlink as described here https://laravel.com/docs/5.8/filesystem

Activity icon

Replied to How To Send Report In In Scheduled Time

You extract report logic from the controller method to a job.

Then dispatch the job in the controller method.

And call the job in the scheduler task.

May
15
5 months ago
Activity icon

Replied to Schedule A Job From A Controller?

The given advice is quite good.

Activity icon

Replied to Images Uploaded In Storage Not Accessible

@ELO - Try something like this. Add it to a temporary /test route.

symlink('/home/username/public_html/storage', '/home/username/public_html/storage/app/public');

use your path to the directories

Activity icon

Replied to How To Add Pagination To This Code

get method returns a collection. I think you should paginate it before calling get.

$files = $files->latest('created_at')->paginate();
Activity icon

Replied to Images Uploaded In Storage Not Accessible

you should run php artisan symboli:link at the shared hosing as well. it does not create a storage folder, it creates a link to /storage/app/public in your public_html folder.

Activity icon

Replied to Error 404

your url is wrong. All the possible urls are at the pic https://appdividend.com/wp-content/uploads/2019/03/Laravel-5.8-CRUD-Tutorial-.png what do you expect to see? books list or a book? for books list it is localhost:81/books, for a specific book it would be localhost:81/books/1

May
13
5 months ago
Activity icon

Replied to Homestead Per Project Installation

Yes it's required. Your browser sends a request to homestead.test but there's no such a website and if you haven't added it to the hosts the browser will tell you that the website does not exist.

Have you added the IP and the domain name to your host's hosts file? It must he your host's machine hosts file

Activity icon

Replied to @push And @stack Don't Seem To Load Javascript

Do you have $(document).ready(function () { ... }) as it is described here? https://github.com/HemantNegi/jquery.sumoselect#usage

Apr
05
6 months ago
Activity icon

Replied to A Package With Jobs

Well, I pulled orchestral/testbench, tweaked my tests and some code and it worked like a charm.

Apr
04
6 months ago
Activity icon

Replied to A Package With Jobs

I tried to downgrade all the dependencies to 1.1 but it didn't work for illuminate/container, because it depends on illuminate/notifications that doesn't have 1.1 version at all

Activity icon

Replied to A Package With Jobs

@MARTINBEAN - My package is for fresh laravel version (5.8, maybe 5.7, probably it will work with older versions as well) I did composer require --dev illuminate/config=~5.8 then composer require --dev illuminate/foundation and got the same error

illuminate/foundation v1.1.2 requires illuminate/config 1.1.* -> satisfiable by illuminate/config[v1.1.0] but these conflict with your requirements or minimum-stability.

Do you mean I should install 1.1 version of config?

Activity icon

Started a new Conversation A Package With Jobs

I'm creating a package that should use a job. The job looks like this

<?php

namespace Vendor\Package\Jobs;

use Illuminate\Foundation\Bus\Dispatchable;

class MyJob implements ShouldQueue {

    use Dispatchable, ...;

    ...
}

To test my package I did composer require --dev for some pachages like Illuminate/database, illuminate/config, etc. Now it seems that I need to pull the illuminate/foundation as well. But it doesn't work

$ composer require --dev illuminate/foundation
Using version ^1.1 for illuminate/foundation
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - illuminate/foundation v1.1.2 requires illuminate/config 1.1.* -> satisfiable by illuminate/config[v1.1.0] but these conflict with your requirements or minimum-stability.
    - illuminate/foundation v1.1.1 requires illuminate/config 1.1.* -> satisfiable by illuminate/config[v1.1.0] but these conflict with your requirements or minimum-stability.
    - illuminate/foundation v1.1.0 requires illuminate/config 1.1.* -> satisfiable by illuminate/config[v1.1.0] but these conflict with your requirements or minimum-stability.
    - Installation request for illuminate/foundation ^1.1 -> satisfiable by illuminate/foundation[v1.1.0, v1.1.1, v1.1.2].


Installation failed, reverting ./composer.json to its original content.

I looked it up and noticed that the package is marked as abandoned.

How can I solve this?

Apr
03
6 months ago
Activity icon

Replied to Coding Help Required!

I think you should share the errors.

Activity icon

Started a new Conversation The Gap On The User Sidebar

I really like the new design but there's one thing that hurt my eyes every day. https://imgur.com/a/NqYlZAx

Mar
28
6 months ago
Activity icon

Replied to How To Run Artisan Commands On A Shared Host

It's just fantabulous.

I found an option in my hosting panel: disable_functions with value exec,shell_exec,system,passthru,popen,proc_open,leak,listen,chgrp,closelog,debugger_off,debugger_on,define_sys. So I just removed proc_open and saved it. It works now :)

Mar
01
7 months ago
Feb
27
7 months ago
Activity icon

Replied to How To Create Plugins For My App?

maybe it should be composer packages?

Dec
12
10 months ago
Activity icon

Replied to Model Alias - 'Members' Vs. 'Users'

$member->groups gives you all the groups the $member is in.

Activity icon

Replied to Check If Input Value Before Update

I guess Eloquent does it automatically - you can set values to the model and call save(). If nothing has been changed it won't really hit the database.

Dec
11
10 months ago
Activity icon

Replied to Pop Up Box With Javascript

or maybe you would like something like this? https://sweetalert2.github.io

Activity icon

Replied to Pop Up Box With Javascript

@DAVY_YG - does it work? do you see the alert with 'success' text? is this what you want?

Activity icon

Replied to Pop Up Box With Javascript

you would add a div with absolute positioning. https://www.w3schools.com/howto/howto_css_modals.asp

Activity icon

Replied to Store Method In API

@FATIMA1 - depends on a technology you're using

Activity icon

Replied to How To Set Every Row On Table To The Same Value

Isn't it a duplicate for the https://laracasts.com/discuss/channels/laravel/update-row-of-database-on-laravel

my answer from there

There must be a query with a join between orders and inventories (or whatever the table name is), then you would add a where like this ->where('orders.user_order_id', '=', DB::raw('inventories.user_id')) and then call ->delete()

Activity icon

Replied to Store Method In API

If you want to send the request with PHP - use Guzzle package. If you use Vue/JS - use axios or a vanila JS ajax request.

Or I didn't understand your question

Activity icon

Replied to Store Method In API

Should project B use the API of the project A?

Activity icon

Replied to Update Row Of Database On Laravel

There must be a query with a join between orders and inventories (or whatever the table name is), then you would add a where like this ->where('orders.user_order_id', '=', DB::raw('inventories.user_id')) and then call ->delete()

Dec
10
10 months ago
Activity icon

Replied to How To Display Name In Nav Bar From Db

{{ auth()->user()->personal_details->first_name }}

Activity icon

Replied to HTML5 Validation Multiple Forms

@petritr would you provide more info about your business process here? what are you going to do?

It's all a bit confusing.

You have a number of forms on the page. Then you do what? Click on a submit button in one of the forms? Then validate the form and submit it?

Activity icon

Replied to HTML5 Validation Multiple Forms

I think the problem is you can't use the same ID for different elements. You would change #save_device to .save_device as well as #submit-new-hidden.

And then change your forms declaration to <form class="save_device">. The same with buttons.

Activity icon

Replied to Very Weird Behavior On Deleting A Model

You forgot each for tasks.

Dec
06
10 months ago
Activity icon

Replied to Conditional Validation For LoginController

You need to know how many login attempts user failed. Then you would decide shoud captcha be required or not.

Yes, you can do it this way

$request->validate([
    'recaptcha' => ($loginAttemts >= 3) ? 'required' : 'nullable'
]);

or like this

$rules [
    'name' => 'required',
];

if ($loginAttemts >= 3) {
    rules['recaptcha'] = 'required';
}

$request->validate($rules);