eludic

eludic

Member Since 2 Years Ago

Experience Points 13,260
Experience Level 3

1,740 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 128
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

03 Jan
4 months ago

eludic started a new conversation Dynamic Drop Down

I am using Laravel with Laravel Collective Forms and HTML to create a web form for the application. I have interlinked drop downs where the options of the second drop down gets populated from what was selected on the primary drop down.

I have managed to get this to work however my issue is, if there is an error in the form with any other field, the app reverts back to the form with the primary drop down selected as per the selected value however the linked drop down does not populate accordingly nor does it show the option values.

How do I fix this issue?

14 Jun
11 months ago

eludic started a new conversation MySQL Error: [ERROR] InnoDB: (Duplicate Key) Writing Word Node To FTS Auxiliary Index Table.

I see so many entries saying "[ERROR] InnoDB: (Duplicate key) writing word node to FTS auxiliary index table." in the MySQL error log. How do I replicate and fix this issue?

I am using MariaDB 10.2 as the database.

I am clueless.

10 Jan
1 year ago

eludic left a reply on Validate Two Array Form Fields

Nevermind, managed to get this work. Changed the code slightly. Changed it to:

fieldname[2][text1] and fieldname[2][text2] then used the required_if validator:

'fieldname.*.field2'      =>  'required_with:fieldname.*.field1',

eludic started a new conversation Validate Two Array Form Fields

I have an HTML form where two input fields are co-related. Both fields are input text fields with array[] assigned to them as the fields are dynamically added to the form.

I want Laravel to validate that value of fieldone[2] cannot be empty if fieldtwo[2] is filled. How do I this for all array fields i.e. fieldone[a] cannot be empty if fieldtwo[a] is filled and fieldone[b] cannot be empty if fieldtwo[b] is filled.

Thanks.

eludic left a reply on Migrate And Seed Only Once

Okay. Thanks :)

05 Jan
1 year ago

eludic left a reply on Migrate And Seed Only Once

Yeah I want this code to only run once and not the next time when db:seed command is executed

eludic left a reply on Migrate And Seed Only Once

Makes alot of sense. Was thinking the same while version application version. However this one does not have this feature. In that case how do I prevent it from running again?

eludic started a new conversation Migrate And Seed Only Once

I have an application which needs to be updated. The application database table "institute" already has a column "report" which is an int value. This needs to be changed and I would be adding a new column called "reports" which will populate according to client submission.

I have already written the migration for the same and added the following code to the DatabaseSeeder.php file:

[code] $institutes = DB::table('institutes')->get(); foreach($institutes AS $institute){

        if(!empty($institute->report)){
            $reports[] = $institute->report;
            $jsonreports = json_encode($reports);

            // Store this and reset file_auditreport
            DB::table('institutes')->where('id', $institute->id)->update([
                'report'      =>  0,
                'reports'     =>  $jsonreports
            ]);
        }
    }

[/code]

My question is, how can I make sure Laravel runs this only once and not everytime I run the command php artisan db:seed as I do not want Laravel to run this in the future if in case there is an update to be made.

Hope this makes sense.

15 Jun
1 year ago
14 Jun
1 year ago

eludic left a reply on Multiple Sessions From Same Browser

Thanks for your input. I was hoping to be able to create different session IDs for each login type but I do not think that is quite possible in Laravel.

13 Jun
1 year ago

eludic left a reply on Multiple Sessions From Same Browser

@jlrdw Admin can be user but not all users are Admin so not all have access to Admin panel.

eludic left a reply on Multiple Sessions From Same Browser

Thank you for your answers:

@Cronix I plan to make this software commercially accessible hence have to look into all kinds of possibilities including the users using the same browser for multiple logins.

Due to this I am exploring this angle. Have used softwares likes Kayako who obviously use their own framework where multiple logins using the same browser is possible. This is due the fact that they create multiple sessions for each login.

Still exploring how this is possible in Laravel.

11 Jun
1 year ago

eludic left a reply on Multiple Sessions From Same Browser

Hi, Thanks for your reply. The queries I posted were issues I faced after following that video. Still looking for answers. Please help.

Thanks

09 Jun
1 year ago

eludic started a new conversation Multiple Sessions From Same Browser

Hi, I am creating an application with different set of users - clients, staff and admin. Each one will have it own set of interface so a staff cannot access admin interface and so on.

I have managed to tweak Laravel for multi-auth system but the issues which I am facing are:

  1. Sessions - Laravel still uses the default session assignment system for logged in users so when a user is accessing the client front end the user_id is captured from user table while for admin interface the user_id is captured from the admin table. While doing so the session id remains the same when accessing the user and admin interface from the "same" browser. I noticed this while testing the system.

I need to tweak Laravel to create a separate session record when a user accesses the staff/admin panel and the user interface. Any hint on how I can do this? Currently I am using separate Guards for auth check so it verifies with the correct database table.

Ideally when the user successfully logs into the admin panel a fresh session record should be created a maintained separately. I think this will fix the issue of auto switching of "user_id" in the sessions table due to same session ID.

  1. I think this has to do with the issue above. On the login form when I select "Remember Me" for client side, it works fine but on the same browser if I choose "Remember Me" for Admin form I get a Token Mismatch error. I think that is because the session IDs are the same. If this is not the issue, let me know how I can fix this.

Thanks.

14 May
2 years ago

eludic left a reply on Storage Symlink

Hi, You can ignore the question. I managed to fix it. The issue was due to incorrect path to the portal/storage/app/public/.

The path was incorrect even while creating the symlink via php artisan. I had to manually set this to make it work.

Hope this helps others too.

Regards,

Hiren Mehta

eludic started a new conversation Storage Symlink

I developed the project on my local host which I now moved to a production server. Laravel fails to retrieve the files from the storage directory. I manually set the symlink to:

ln -sf home/user/portal/storage/app/public/ home/user/public_html/domain.com/portal/storage/

And ran the php artisan storage:link which fetches the result: The "public/storage" directory already exists.

When I ls -la to the public_html/domain.com/portal directory I see the result: storage -> home/user/portal/storage/app/public/

The URL for the file is set to -- http://www.domain.com/portal/storage/documents/4_filename.pdf which is correct but when the URL is opened in the browser it gives a 404 error.

When I click on public_html/domain.com/portal/storage via FTP it shows the content from portal/storage/app/public/ but when I try to cd public_html/domain.com/portal/storage via SSH it gives the error:

-bash: cd: storage: No such file or directory

I have spent too much time to work this but have not yet found a resolution. Can anyone please help me?

Thanks,

Hiren Mehta

eludic left a reply on Protected

Thanks. That really helps!

03 May
2 years ago

eludic started a new conversation Protected

I am learning Laravel and have seen quite a few videos on the site. I see Eloquent has a feature to protect a few database fields which when passed displays a mass assignment exception error. My question is, if the field is protected then how do you pass this value via code to process the query.

For instance there is a subscription based website which has a subscription model and a user model. The userid is protected for the subscription model.

In this case how do you pass this value when a new subscription is created?

I am sorry if I do not sound too clear but believe me I am trying :)