jdc1898

Experience

13,230

0 Best Reply Awards

  • Member Since 2 Years Ago
  • 129 Lessons Completed
  • 0 Favorites

20th June, 2018

jdc1898 left a reply on Hypens In DB Data Returning Substrings • 1 month ago

@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 • 1 month ago

Good thought but no.

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

jdc1898 left a reply on Laravel Images Broken When Deployed • 1 month ago

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 • 1 month ago

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

jdc1898 left a reply on Deploying Laravel Project • 1 month ago

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 • 1 month ago

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 • 1 month ago

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?

14th June, 2018

jdc1898 left a reply on Problem With Hosting Laravel Project • 1 month ago

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 • 1 month ago

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

12th June, 2018

jdc1898 left a reply on How To Store IMAGES Outside Public Folder • 1 month ago

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 • 1 month ago

Sorry didn't see your second example.

Can you post you schema?

jdc1898 left a reply on How To Store IMAGES Outside Public Folder • 1 month ago

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

11th June, 2018

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

Did you try this?

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

jdc1898 started a new conversation Feature Promotio • 1 month ago

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.

22nd January, 2018

jdc1898 left a reply on Refactoring Code Snippet For Test Suite • 5 months ago

Can you use the __construct method and pass your slug?

jdc1898 left a reply on Returning Related Data Values • 5 months ago

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');

19th October, 2017

jdc1898 left a reply on $.ajax() POST Translating To GET • 9 months ago

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')

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.