dberry

Sr. Lead Software Engineer at Carnegie Technologies

Experience

38,875

15 Best Reply Awards

  • Member Since 3 Years Ago
  • 218 Lessons Completed
  • 0 Favorites

3rd October, 2015

dberry left a reply on Complexity Of The Code Of Laravel And Its Performance • 2 years ago

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

8th September, 2015

dberry left a reply on Why Laravel Docs Not Good As Codeigniter • 2 years ago

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...

15th August, 2015

dberry left a reply on Laravel New Command • 2 years ago

@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

19th July, 2015

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

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

7th July, 2015

dberry left a reply on Including File From Parent Directory In Blade Templates. • 2 years ago

@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"

19th June, 2015

dberry left a reply on Stopping Multiple Form Submission. • 2 years ago

@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

13th June, 2015

dberry left a reply on Do We Still Need Guard $auth? • 2 years ago

@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 • 2 years ago

@jimmck I definitely recommend the powerpack

10th June, 2015

dberry left a reply on L5.1 Create Method ? • 2 years ago

@crazymonster, what error did you get?

dberry left a reply on Software To Track Development Of Project • 2 years ago

Asana

https://asana.com and also leankit

dberry left a reply on Code Editors/IDE's For OS X Yosemite • 2 years ago

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

Other Tools I love...

9th June, 2015

dberry left a reply on Custom Accessor Not Working Anymore ? • 2 years ago

@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) • 2 years ago

@kastony , have you added it to

protected $appends = ['label'];

dberry left a reply on Custom Accessor Not Working Anymore ? • 2 years ago

@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.

4th June, 2015

dberry left a reply on Extra. Extra. Get Your Shirt! • 2 years ago

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

28th May, 2015

dberry left a reply on Clever Way To Index (Related) Models Into ElasticSearch • 2 years ago

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

18th May, 2015

dberry left a reply on HMVC In Laravel 5? • 2 years ago

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.

17th May, 2015

dberry left a reply on HMVC In Laravel 5? • 2 years ago

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.

6th May, 2015

dberry left a reply on Research About Laravel! Developers Please Respond! • 2 years ago

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? • 2 years ago

@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.

3rd May, 2015

dberry left a reply on A Few Ideas • 2 years ago

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.

28th April, 2015

dberry left a reply on Javascript Frameworks? • 2 years ago

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.

23rd April, 2015

dberry left a reply on ERP Open Source • 2 years ago

@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 • 2 years ago

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 • 2 years ago

@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.

22nd April, 2015

dberry left a reply on Laravel 5 CRUD • 2 years ago

Create a route to your controller

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

Then use that uri in your ajax

21st April, 2015

dberry left a reply on Developing Your Packages In Laravel 5 • 2 years ago

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

20th April, 2015

19th April, 2015

dberry left a reply on Open Link In New Tab • 2 years ago

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

dberry left a reply on Practical Uses For Lumen? • 2 years ago

@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.

18th April, 2015

dberry left a reply on Practical Uses For Lumen? • 2 years ago

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? • 2 years ago

Why are you porting your Laravel App to Lumen?

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

http://laravel.com/docs/5.0/eloquent#relationships and scroll down to Inserting Related Models (Many To Many)

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

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

Courses should be the method...

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

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 • 2 years ago

belongsToMany() not hasMany()

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

@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 • 2 years ago

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

dberry left a reply on Practical Uses For Lumen? • 2 years ago

@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.

17th April, 2015

dberry left a reply on Case Insenstive Auth • 2 years ago

Case insensitive passwords sounds like a really terrible idea.

dberry left a reply on Practical Uses For Lumen? • 2 years ago

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? • 2 years ago

@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? • 2 years ago

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.

16th April, 2015

dberry left a reply on Create A "Lumen" Channel For Lumen Specific Questions • 2 years ago

Haha, sorry, i couldn't resist!!

dberry left a reply on Create A "Lumen" Channel For Lumen Specific Questions • 2 years ago

@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.

15th April, 2015

dberry left a reply on Lumen • 2 years ago

@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 • 2 years ago

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 • 2 years ago

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 • 2 years ago

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

Edit Your Profile
Update

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