jdc1898

jdc1898

Member Since 3 Years Ago

Experience Points 26,230
Experience Level 6

3,770 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 238
Lessons
Completed
Best Reply Awards 3
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.

23 Apr
2 months ago

jdc1898 left a reply on Internal Laravel Website - Setup

Excellent!

If this helped, would you kindly mark it as resolved and my response as the best reply?

Thanks!

jdc1898 left a reply on Troubleshoot A Route

@ludo1960 If this helped, would you kindly mark it as solved and best reply?

Thanks!

16 Apr
2 months ago

jdc1898 left a reply on Redirect Not Working

That typically means you have a browser caching issue. Safari does that a lot.

15 Apr
2 months ago

jdc1898 left a reply on Redirect Not Working

Everything looks good. Any chance you have a caching issue on your browser? Maybe test in Chrome incognito mode? php artisan clear:cache?

jdc1898 left a reply on Redirect Not Working

What is the result if you dd($thread->path());?

jdc1898 left a reply on Redirect Not Working

Go ahead and post your controller and blade.

jdc1898 left a reply on Redirect Not Working

Also, did you make sure you have your {{ csrf_field() }} set in your form?

jdc1898 left a reply on Redirect Not Working

Can you post your ThreadsController.php file?

jdc1898 left a reply on Redirect Not Working

Just to confirm, you are following along with https://laracasts.com/series/lets-build-a-forum-with-laravel?

jdc1898 left a reply on Redirect Not Working

It sounds like your link isn't being set. Can you inspect the code in web inspect and verify the href= is correct?

jdc1898 left a reply on Pluck Only Name From A Nested Array

Can you not just do this? return $array['data']['metadata']['name'];

jdc1898 left a reply on Laravel 5.8 With Sweetalerts

Are you getting some sort of error when trying to use it?

jdc1898 left a reply on How Can I Use Pusher Echo With SharedWorkers?

We use channels like groups. So a user can belong to many groups. We also have a group per user for direct messaging.

jdc1898 left a reply on Troubleshoot A Route

Start with php artisan route:list and see if your route shows up.

jdc1898 left a reply on Internal Laravel Website - Setup

Perhaps you can use something like this? https://github.com/composer/satis You may have to download the code and publish it locally, but it might just meet your needs. You just have to remember to update your packages manually from time to time.

24 Feb
4 months ago

jdc1898 started a new conversation Notifications

Does anyone know of an existing plugin that allows forms to be in bootstrap notifications? Sort of like how slack allows quick reply on the Mac.

13 Feb
4 months ago

jdc1898 left a reply on SSH

@raychung Thanks, That worked. When using composer require laravelcollective/remote it installs. Interestingly enough, their site show support up to 5.4.

12 Feb
4 months ago

jdc1898 left a reply on ForEach Loop Results Assigned To Variable In Blade

Maybe I am not understanding but can you just do this?

@foreach($opps as $opp) Copy List @endforeach

jdc1898 started a new conversation SSH

How do others connect to remote servers with Laravel? I use SSH in raw PHP but saw the feature was removed from the base many releases ago.

10 Feb
4 months ago

jdc1898 left a reply on Videos Not Playing

Videos are playing fine here.

05 Dec
6 months ago

jdc1898 left a reply on Nova Resource Color Coding

@jlrdw - I have not used Tailwind up to this point. My exposer has been to Bootstrap primarily. I suspect it is fundamentally the same.

I am aware of the concepts of the model property and how Nova interfaces with it.

I also have watched 100% of the Nova video that Laracast published. They are well done and I enjoyed all of them.

I was hoping maybe there was a ->format('red') or something along those lines that I could use.

jdc1898 left a reply on Display Select Field With Data From ENUM Table Field

I use something like this:

Select::make('Category', 'CategoryId')->options(\App\Models\Inventory\Category::pluck('CategoryName', 'id'))

jdc1898 left a reply on Custom Index Table

Do you mean you want to show the calendar on the dashboard?

jdc1898 left a reply on Nova Metric

@1stevengrant

Try this:

return $this->result($revenue)->currency()

If you look at the setters in the ValueResult.php file you can see what is happening. There is no ->format() in the traditional sense that I see.

jdc1898 started a new conversation Nova Resource Color Coding

Is there a way to color code a value in the table from a resource? Example: OnHand=5 MinQty=20 would make the onHand number red.

jdc1898 left a reply on Populate Select Field From Database

This is a great reply! I too searched for this a while back and @frezno post was spot on.

28 Nov
6 months ago

jdc1898 left a reply on Nova Date Vs Created_at

I am using the following:

Resource:

        return [
            (new Metrics\Accounts)->width('1/2'),
        ];

Model:

    public function accounts()
    {
        return DB::where('sg_sms_account', '')->select('select date, sg_sms_account')->get();
    }

The issue is when the page loads I get a SQL error.

Column not found: 1054 Unknown column 'created_at' in 'field list' (SQL: select date_format(`created_at` - INTERVAL 5 HOUR, '%Y-%m-%d') as date_result, count(`reports`.`id`) as aggregate from `reports` where `created_at` between 2018-10-31 00:00:00 and 2018-11-29 03:37:32 group by date_format(`created_at` - INTERVAL 5 HOUR, '%Y-%m-%d') order by `date_result` asc)

jdc1898 started a new conversation Nova Date Vs Created_at

Is there a way to use a date formatted as Y-M-D instead of the created_at field? I have existing data that I would like to generate a trend but get an error.

16 Nov
7 months ago

jdc1898 started a new conversation Multi Auth

Does anyone have an sample code or link they code share showing how to make Laravel support both Basic Auth or LDAP by using a toggle in the .env?

20 Jun
1 year ago

jdc1898 left a reply on Hypens In DB Data Returning Substrings

@shez1983 You nailed it! Is that something that you just knew or is it documented? Anyway Thank you!

jdc1898 left a reply on Hypens In DB Data Returning Substrings

Good thought but no.

    protected $primaryKey = 'sku';
    public $timestamps = false;
    protected $fillable = [...]

jdc1898 left a reply on Laravel Images Broken When Deployed

Okay. If you have a file that you put in that directory, say sample.jpg, then the image will be available. Example: http://localhost/storage/sample.jpg

jdc1898 left a reply on Laravel Images Broken When Deployed

Did you create a symbolic link by using the php artisan storage:link command?

jdc1898 left a reply on Deploying Laravel Project

Why did you alter your index.php file? Your routes should be in you api.php file.

jdc1898 left a reply on Laravel Images Broken When Deployed

If you put images outside of the public folder then they will not be accessible to visitors.

If you do decide to do this, then any images will need to be streamed to the client by your code and not directly accessible as assets by the browser

jdc1898 started a new conversation Hypens In DB Data Returning Substrings

I have a dataset that stores SKU's in a table (10107686-1282-CS-500) but when I return this column from the database it only returns (10107686) and I can't figure out why. What is odd is that if I dump the returned object, the SKU appear correct.

Example:

    [attributes:protected] => Array
        (
            [sku] => 10107686-1282

the column name is (sku) in the table and I am accessing it by $data->sku

What am I doing wrong here?

14 Jun
1 year ago

jdc1898 left a reply on Problem With Hosting Laravel Project

Is is safe to assume your connections are properly configured in your .env or config/database.php file? Was it working and stopped?

jdc1898 left a reply on Feature Promotion

@mschaelin something like this is exactly what I was looking for. Thank you! Are there any other ones out that to compare?

12 Jun
1 year ago

jdc1898 left a reply on How To Store IMAGES Outside Public Folder

Someone else may can chime in on whether or not that "will" work. It is my understanding that the resources directory is designed for pre-processed files that will be combined. Like JS or CSS.

As @jlrdw mentioned, it is a filesystem so you can probably do whatever you want.

jdc1898 left a reply on How To Calculate The Total Likes Of All Posts Of A User

Sorry didn't see your second example.

Can you post you schema?

jdc1898 left a reply on How To Store IMAGES Outside Public Folder

Public is common and appropriate for non-preprocessed resources.

To access those assets from your bade you simply reference it.

Example: {{ asset('images/1.png') }} is the same as public/images/1.png

11 Jun
1 year ago

jdc1898 left a reply on How To Calculate The Total Likes Of All Posts Of A User

Did you try this?

$post = Post::whereUserId(auth::id())->get('id')->count();

jdc1898 started a new conversation Feature Promotio

Looking for some guidance from the community on the best package or solution to guide new users through particular features of my App. For example, if I release a new feature that allows users to subscribe to my newsletter and it is a new menu item, the next time someone logs into my site, I want to auto expand the menu and night the new feature. Of course a nice little message next to it would appear detailing its purpose. Any subsequent time a user logs in they would not get that message. I would like to gently “remind” them once a month if they aren’t using the feature or otherwise disabled feature notifications. Before jumping into writing something I thought I would get some opinions on what the best direction would be. I know Laravel’s broadcast channels may be an avenue so looking forward to what people do for things like this.

22 Jan
1 year ago

jdc1898 left a reply on Refactoring Code Snippet For Test Suite

Can you use the __construct method and pass your slug?

jdc1898 left a reply on Returning Related Data Values

Did you read through: https://laravel.com/docs/5.5/eloquent-relationships#has-many-through paying attention to the section "Has Many Through"?

I think you should be able to return whatever data you want this way...

return $this->hasManyThrough('App\OrderDetail', 'App\Orders');

19 Oct
1 year ago

jdc1898 left a reply on $.ajax() POST Translating To GET

Are you sure that it is hitting the correct URL? Can you look at your web server log and see it actually going to the expected endpoint?

Meaning does ('bug/report' = '/bug/report')