dberry

dberry

Sr. Lead Software Engineer at Carnegie Technologies

Tullahoma, TN

Member Since 4 Years Ago

Experience Points 40,575
Experience
Level
Lessons Completed 233
Lessons
Completed
Best Reply Awards 15
Best Answer
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 Oct
3 years ago

dberry left a reply on Complexity Of The Code Of Laravel And Its Performance

@vedmant, I disagree. It's not a complex approach. It's a very flexible approach.

08 Sep
3 years ago

dberry left a reply on Why Laravel Docs Not Good As Codeigniter

Even if there were more examples, there would still be complaining about how they aren't the right examples.

The best examples are the code itself. If you haven't opened up your code editor and gone through the source, you can't blame anyone but yourself for not know what is going on.

Maybe we can get Taylor to go ahead and just code our apps for us as well...

15 Aug
3 years ago

dberry left a reply on Laravel New Command

@ralanyo have you looked at their docs? They have a video for installing Laravel.

Don't use the Laravel installer.

https://serverpilot.io/community/articles/install-laravel.html

19 Jul
3 years ago

dberry left a reply on Why Is _ide_helper.php Full Of An Ocean Of Errors In PHPStorm?

Is it not working, as in not autocompleting? If it is, why are you spending time debugging an ide helper file?

07 Jul
3 years ago

dberry left a reply on Including File From Parent Directory In Blade Templates.

@include('path.to.the.view')

@include('partials.header')">@include('language.type')
@include('languages')

http://laravel.com/docs/5.1/blade and scroll down to "Including sub views"

19 Jun
3 years ago

dberry left a reply on Stopping Multiple Form Submission.

@timavo, definitely should not edit the vendor file.

just add your code to app/Http/Middleware/VerifyCsrfToken.php this extends the base class and is the file that gets included in the app/Http/Kernel.php.

Same with the FormRequest... Look inside app/Http/Requests.php

13 Jun
3 years ago

dberry left a reply on Do We Still Need Guard $auth?

@Kryptonit3, curious... why do you feel like it is a "much cleaner approach" what makes it cleaner? Any ramifications when it comes time to test?

dberry left a reply on Code Editors/IDE's For OS X Yosemite

@jimmck I definitely recommend the powerpack

10 Jun
3 years ago

dberry left a reply on L5.1 Create Method ?

@crazymonster, what error did you get?

dberry left a reply on Code Editors/IDE's For OS X Yosemite

Already been said... PHPStorm & Sublime Text...

Other Tools I love...

09 Jun
3 years ago

dberry left a reply on Custom Accessor Not Working Anymore ?

@kastony, have you added it to the appends array?

protected $appends = ['label'];

dberry left a reply on ::lists No Longer Returns An Array. (Laravel 5.1)

@kastony , have you added it to

protected $appends = ['label'];

dberry left a reply on Custom Accessor Not Working Anymore ?

@mstnorris, he said "custom accessor" and "where the label attribute did not exist." meaning "append"-ing an attribute that doesn't exist in the data model, which unless it changed in 5.1 from 5.0 isn't called the same way as accessors/mutators for attributes that exist in the data model.

04 Jun
3 years ago

dberry left a reply on Extra. Extra. Get Your Shirt!

yeah, some man-sized shirts would be great :)

28 May
3 years ago

dberry left a reply on Clever Way To Index (Related) Models Into ElasticSearch

Here's a couple of packages that might be of use either for integration or to give ideas for implementing it on your own.

https://github.com/shift31/laravel-elasticsearch https://github.com/adamfairholm/Elasticquent

18 May
3 years ago

dberry left a reply on HMVC In Laravel 5?

I'm not sure what you mean by CRUDish.

I think you're not thinking outside of the box and in a linear thought process. Say I have a base platform and I wanted to give user's the ability to choose what features they want to use or charge for different modules/extension. Say the Platform is a CMS of sorts, and there is an extension to add a Blog, or Shopping Cart or Photo Gallery... there really is no limit here. Or if I wanted to give developers an easy system to hook into.

It all 100% depends on the application that you are building and there is no "this is the way is should be done" or "that just seems like a terrible way to do it".

If I'm just building a simple blog that I'll use for personal use, then no, you don't need a full out extension system. However, if I'm building something that a customer can use in place of say WordPress, then an extension system makes perfect sense.

We're building a huge learning platform right now, where a modular approach makes perfect sense.

I think that the preface to your statement is, "You tried it and it didn't work for you" and the explanation should be "This is the background on what I was doing and why it didn't work in this scenario"

I can name you pages and pages of well-built, extremely usable, easy to develop, very profitable apps using a modular approach. It 100% depends on what you're doing and how you do it.

17 May
3 years ago

dberry left a reply on HMVC In Laravel 5?

I've used modules (i.e. extensions) in several apps, several very large apps and have never had an issue. Depending on the app, I love the modular approach. Some modules are completely independent of any other module, some modules require other modules, which I handle through dependency checking and sorting.

I've personally never had to deal with issues like @andy on how to deal with modules that could depend on another module, and I disagree with @sukonovs in that it's "bad" or a bad way to build an app.

If you do it poorly, then it's a bad way. I built an extension system that I use and so far it hasn't turned out "bad" and I'm also pretty happy/confident in my code and in that it wasn't designed poorly.

Moral of the story, plan it out before you write a single line of code, don't jump in balls deeps without knowing what you're getting into and you'll be fine.

06 May
3 years ago

dberry left a reply on Research About Laravel! Developers Please Respond!

It's just a google form questionnaire folks that took two minutes to complete. Obviously English isn't a first language in this case, it could probably hide questions that aren't relevant based on other answers, but it's a simple Google form.

dberry left a reply on What Would You Love To See In Laravel 5.1?

@EliasSoares, you could just advise your users to put php artisan vendor:publish --provider="Your\Provider in the composer.json post-update-cmd scripts. then they won't have to run the command every time.

03 May
3 years ago

dberry left a reply on A Few Ideas

Slugs can be handled pretty easily, just use a mutator:

public function setMySlugAttribute($value) 
{
    $this->attributes['my_slug']  = \Str::sluggable($value) ;
} 

If you want, you can throw in validation or whatever, or use a different field, whatever you want. You can throw it in a trait to reuse.

I've never used a package to handle slugs.

Adding a related model is also pretty trivial and there is an example in the docs.

For dynamically adding rows, that is pretty trivial as well and is javascript. Google "jquery add remove rows"

Multiple video uploads, just do a foreach and loop over them.

28 Apr
3 years ago

dberry left a reply on Javascript Frameworks?

This is an older thread, but I had mentioned seeing a package before to ease the pains of the validation on the server/frontend side, here is a package that attempts that:

https://github.com/proengsoft/laravel-jsvalidation

I haven't tried it, but it look simple enough.

23 Apr
3 years ago

dberry left a reply on ERP Open Source

@martinbean, it was just poor english... All the he/she did was ask "hey does anyone know of an ERP package based on Laravel" Even with the bad english, I think that was a pretty clear question that anyone who took a second to read it and had any comprehension skills whatsoever could figure out. Not everyone speaks english as a first or even second language.

@pmall, you're right, I get sometimes just doing it yourself is what you have to do, but before you venture down the road of re-creating the wheel, especially when it comes to something like an ERP, there is no hurt in asking the community if there is a package out there already. It's not like he said "Hey this is what I need, will you code it for me".

dberry left a reply on Persisting Data Application

It's always available in the request...

Request::user() 
app('request')->user() 

Or you can do something in a base controller that you extend :

$this->current User = app('request')->user():
app('view')->share('currentUser',  $this->currentUser) ;

I typed this in my phone so excuse errors and the brevity.

dberry left a reply on ERP Open Source

@Alercard, I'm not sure why the other two are being dicks... I've not seen a completed laravel erp solution yet. There are some started on github, but none that I've seen complete.

22 Apr
3 years ago

dberry left a reply on Laravel 5 CRUD

Create a route to your controller

Route::get('increment', 'MyController@methodName');

Then use that uri in your ajax

21 Apr
3 years ago

dberry left a reply on Developing Your Packages In Laravel 5

The vendor directory should be packages that are managed by composer, it's not a development directory.

I mean technically you could, but it's frowned upon. Using something like Studio, it's extremely simple to do what you're wanting to do, it takes care of all of the auto-loading for you kind of like the old workbench feature in Laravel 4.2 did, with the exception of it's cleaner (as it's a composer plugin) and it's not Laravel specific (meaning it doesn't do the service provider, etc...)

19 Apr
3 years ago

dberry left a reply on Open Link In New Tab

@bashy... wait... did you just call Jeffery a poor man? :D

dberry left a reply on Practical Uses For Lumen?

@LeBlaireau, I didn't quite mean it in that sense. I meant it is pointless to keep adding features to it to make it more like Laravel and have all of the features that laravel has. If you need that then just use laravel.

Lumen has a specific purpose, geared towards specific types of apps/services and doesn't need all of that extra.

18 Apr
3 years ago

dberry left a reply on Practical Uses For Lumen?

I don't know that I'd go so far as to say

Expect these kind of features in the future ;)

They really just aren't needed. Why even have Lumen if all you are going to do is make it Laravel? Why does this even make sense?

Most stuff people really like in Laravel might get added to Lumen

Just use Laravel. Don't you think that if he could implement it any faster in Laravel, he would just do it in Laravel? Why leave it as is in Laravel and then

modify it a bit so the speed of Lumen isn't touched!

How does that even make sense?

dberry left a reply on Lumen - Binding Repo To Implementation Based On Route Param?

Why are you porting your Laravel App to Lumen?

dberry left a reply on 'SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column

$user->courses()->attach(1)

Courses should be the method...

dberry left a reply on 'SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column

hasMany is not a pivot relationship... If the User hasMany Courses, it's going to look through the courses table and find all of the courses that has a user_id matching the user. hasMany === a one to many relationship.

You want a many to many relationship here, so use belongsToMany

dberry left a reply on 'SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column

belongsToMany() not hasMany()

dberry left a reply on 'SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column

@erozas Well in your User Model you've setup a return $this->hasMany('Course'); relationship, not a belongsToHasMany(). That is why it's looking for the user_id

dberry left a reply on 'SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column

what's the code your calling that's giving you that error?

dberry left a reply on Practical Uses For Lumen?

@godabout, I think that the real benefit is going to be for people who have already been using Silex, Slim 3 or similar, in places where Laravel just doesn't make sense to use and the people who actually understand the architecture difference rather than folks who happen to know a little code, but aren't really developers.

17 Apr
3 years ago

dberry left a reply on Case Insenstive Auth

Case insensitive passwords sounds like a really terrible idea.

dberry left a reply on Practical Uses For Lumen?

Similar to @gregrobson usage, I'm working on a service for handling my Stripe webhooks. Handle the incoming requests from Stripe, triggers queues and events for sending out emails, triggering events in the app to update the database, etc...

dberry left a reply on Practical Uses For Lumen?

@samsoft, prefix is not a supported attribute. You'll need to write out each of the routes.

$app->get('api/v1');
$app->post('api/v1');
$app->get('api/v1'/{id});

etc...

dberry left a reply on Practical Uses For Lumen?

For those times whee it just seems silly to be using a full-fledge full-stack framework, when all you need is something quick, that performs.

16 Apr
3 years ago

dberry left a reply on Create A "Lumen" Channel For Lumen Specific Questions

Haha, sorry, i couldn't resist!!

dberry left a reply on Create A "Lumen" Channel For Lumen Specific Questions

@bashy, well if most of your time is spent checking threads you can't answer, then it's time to step up your game so you can answer them....

Lol, I keed, I keed...

I also would like to see an improvement here.

15 Apr
3 years ago

dberry left a reply on Lumen

@andy, haha, dev-ing on a mac is so much easier overall than on Windows.

I do use vagrant now, it's just so easy, but, I started off on the server engineering side of things so there was a time I had to setup servers from a blank command-line.

Take the time to learn how to set up a server on your own, break down and start learning virtualbox & vagrant, you'll thank everyone in here who has badgered you thus far.

Head over to http://serversforhackers.com sign up, do the tuts, look over the forums, buy the book. @fideloper has done a hell of a job with this.

Being a dev, you don't have to be a server engineering genius, but it is beneficial to you to know how everything fits together and even knowing the basics will make you a better developer.

dberry left a reply on Lumen

Yeah it works just fine for me out of the box. I've already finished two different services and started an API.

I used WAMP once, I also wiped my ass with poison oak on mistake too once, both experiences sucked and were painful.

dberry left a reply on Laravel 5 Response()->json() Is A Undefined Method

Use the response()->json() method like you are doing rather than just returning an array.

As others have said, you can just pass the array and Laravel is indeed smart enough to figure out that it needs to be turned into JSON, but.... this is a really bad practice, especially if you are building an API.

Jeffery does a good job of explaining this, take a second to watch this video, you can skip to the middle if you're impatient. https://laracasts.com/series/incremental-api-development/episodes/2

dberry left a reply on Lumen

The issue here is not understanding the difference between a full-stack framework and a micro-framework. They serve two completely different purposes.

Forget the terms Laravel and Lumen and figure out the difference between the two types of frameworks. As far as terminology goes, you can interchange Lumen with Silex, Slim 3 or any of the other micro-frameworks.

So think in terms of where would I use Slim versus using Laravel to develop my project? Does my project require a full-blown framework, or do I just need it to serve a single purpose?

I can't stress enough that they are two different frameworks that serve two completely different purposes.

I really don't know how it can be explained any better than this... http://lumen.laravel.com/docs/introduction#when-should-i-use-lumen