bobbybouwmann

Developer at Enrise

Experience

855,775

1027 Best Reply Awards

  • Member Since 2 Years Ago
  • 971 Lessons Completed
  • 12 Favorites

8th May, 2017

bobbybouwmann left a reply on Internal Error: Failed To Retrieve The Default Value • 2 weeks ago

This is your problem I guess

Route::get('/post/manage', [email protected]')->name('managepost');
Route::get('/post/manage', [email protected]')->name('deletepost');

You declared the same route twice

bobbybouwmann left a reply on Custom Error Page (er.500) • 2 weeks ago

@laurence Yeah, it's awesome! It also comes with a better design ;)

bobbybouwmann left a reply on Braintree Integration • 2 weeks ago

@vcgnetwork Braintree offers more pay providers, which is nice ;)

bobbybouwmann left a reply on Tests\Browser\ExampleTest::testBasicExample Facebook\WebDriver\Exception\TimeOutException: Waited 5 Seconds For Selector [.chat-composer]. • 2 weeks ago

The error message is clear right? It can't find the .chat-composer element on the page!

2nd May, 2017

bobbybouwmann left a reply on Laravel Storage Folder Permission • 2 weeks ago

@lifesound 777 means that it's writable for all users and groups on the server. You can also use other permissions, but that means more configuration on your server.

27th April, 2017

bobbybouwmann left a reply on Tests\Browser\ExampleTest::testBasicExample Facebook\WebDriver\Exception\TimeOutException: Waited 5 Seconds For Selector [.chat-composer]. • 3 weeks ago

It looks like it can't find that element. Are you sure it's on the page?

21st April, 2017

bobbybouwmann left a reply on Blackist Mime • 1 month ago

Create a custom validation rule for it ;)

bobbybouwmann left a reply on Blackist Mime • 1 month ago

Just specify the mimes in your validation you want to allow in your upload process. In my opinion you can better be more explicit then blacklist some stuff. You might forget a few you also don't want!

20th April, 2017

bobbybouwmann left a reply on Distinct Or Empty Values On Array Validation • 1 month ago

@Serringer sometimes will only perform the rest of the rules when the key is available ;)

bobbybouwmann left a reply on Not Returning Array Scout • 1 month ago

What does it return?

19th April, 2017

bobbybouwmann left a reply on Sending Email After Specific Date • 1 month ago

The later method only works when you use a real queue I believe, for example redis.

There were some problems with this in Laravel 5.2 and 5.3. This should be completely fixed in Laravel 5.4: https://laravel.com/docs/5.4/mail#queueing-mail.

Issue: https://github.com/laravel/framework/issues/15358

bobbybouwmann left a reply on Understanding The 'this' Keyword Inside Vue Instance • 1 month ago

I think you can compare data variable in vuejs with public properties of a class in PHP. This will then refer to that class and so the property is available.

You can see the props and data as constructor items that are set on a class when created I guess.

bobbybouwmann left a reply on Distinct Or Empty Values On Array Validation • 1 month ago

I think you need the sometimes rule here, but I'm not sure though

bobbybouwmann left a reply on Artisan Tinker App URL • 1 month ago

@malvin8 Nice spam...

bobbybouwmann left a reply on Enforcing Https Not Working Except In Chrome • 1 month ago

Your application shouldn't handle this for you. This should be done in your vhost.

https://serverfault.com/questions/250476/how-to-force-or-redirect-to-ssl-in-nginx

bobbybouwmann left a reply on [Illuminate\Database\QueryException] SQLSTATE[42S01]: Base Table Or View Already Exists: • 1 month ago

It says that the table already exists in the database. What are you trying to do? Run migrations?

bobbybouwmann left a reply on What Is The Difference Between Package Declaration In Config/app.php Over Class Controller? • 1 month ago

@Cronix Exactly. Also when registered with app.php it will be optimized for further usage!

18th April, 2017

bobbybouwmann left a reply on What Is The Difference Between Package Declaration In Config/app.php Over Class Controller? • 1 month ago

When you load a package using app.php it will be bootstrapped by the framework so the framework already knows about the class. It will be added to a generated php file that makes the framework quicker.

Registering your package in app.php makes it also easier to support dependency injection.

17th April, 2017

bobbybouwmann left a reply on Two ORDER BY Clauses And A LIMIT • 1 month ago

The query looks good to me. However your created_at where statement might not show enough results.

12th April, 2017

bobbybouwmann left a reply on HTML To PDF Viewer • 1 month ago

Yes, but the error talks about an unexpected token. So not sure where that happens. Can be in your code as well right?

bobbybouwmann left a reply on Create A Database In Laravel • 1 month ago

Well the error is pretty clear right?

Also on that note, Postgres does not have a "CREATE IF NOT EXISTS" functionality. You can Google for alternatives which include the following useful links:

bobbybouwmann left a reply on HTML To PDF Viewer • 1 month ago

I can't really see what the error is. Can you post some code that might cause this?

11th April, 2017

bobbybouwmann left a reply on Use Composer Create Own Project Template • 1 month ago

Yeah, you either need to tag your package on Github or change the minimum-stability flag in your composer.json file

bobbybouwmann left a reply on Use Composer Create Own Project Template • 1 month ago

Well your project works like a package with dependencies. So you can simply create a new composer project and you are done ;)

Follow the submit process here: https://packagist.org/packages/submit

Note your project must be on Github for this, since composer is focused on OpenSource packages

bobbybouwmann left a reply on Create A Database In Laravel • 1 month ago

Did you check the postgres logs?

bobbybouwmann left a reply on Create A Database In Laravel • 1 month ago

Have you tried to catch the output of the exec call?

$output = $pdo->exec(sprintf(
    'CREATE DATABASE IF NOT EXISTS %s ;', $database
));

$this->info($output);

7th April, 2017

bobbybouwmann left a reply on Can't Access Staging Server Via IP • 1 month ago

You need to update your hosts file and assign a domain to the ip adres

// IP of server | Some domain
171.24.3.56  mysite.com

5th April, 2017

bobbybouwmann left a reply on Subdomains And Auth • 1 month ago

You need to update the domain config ib your config/session.php to something like this, so the session is shared between subdomains.

'domain' => '.sample.com',

bobbybouwmann left a reply on Getting "PHP Fatal Error : Trait" When Running Phpunit? • 1 month ago

So customer is not a property of the $user object. Did you define that relation?

bobbybouwmann left a reply on Getting "PHP Fatal Error : Trait" When Running Phpunit? • 1 month ago

What part is line 325? It looks like an object is null here

4th April, 2017

bobbybouwmann left a reply on Getting "PHP Fatal Error : Trait" When Running Phpunit? • 1 month ago

CustomerAPITest should have the namespace set to Tests instead of Tests\Traits

2nd April, 2017

bobbybouwmann left a reply on Mails In Lumen?? • 1 month ago

You need to add it by your self. The following steps should do it

// Require the mail package
composer require illuminate/mail

// Next you need to register the mailer in bootstrap/app.php
$app->register('App\Providers\AppServiceProvider');
$app->withFacades();

// You can now send emails using the Mail facade
Mail::raw('Raw string email', function($msg) { $msg->to([[email protected]']); $msg->from([[email protected]']); });

Note: I did this out of my head so you might need to tweak it a bit, but this is the basic idea

30th March, 2017

bobbybouwmann left a reply on How To Create Edit.blade.php File For This Events • 1 month ago

Start with the Laravel From Scratch series. This serie is free and learns you a lot about the framework. From creating stuff + editing like you want to do right now.

Serie: https://laracasts.com/series/laravel-from-scratch-2017

bobbybouwmann left a reply on Laravel Search Routing • 1 month ago

Well it depends.. as always :P

If your view and data is the same for both displaying all or based on the query your current approach would be fine. You would have something like this

// Let's say you have a list of articles
public function search(Request $request)
{
    if (count($request->all()) > 0) {
        $articles = $this->doSearchQuery($request);
    } else {
        $articles = $this->doAllQuery();
    }

    return view('search', compact('articles'));
}

bobbybouwmann left a reply on How To Create A Country Field (with List Of Countries) To Already Migrated Table.can Any Please Guide Me Through Steps • 1 month ago

Can you show what you have done in your controller so far?

29th March, 2017

bobbybouwmann left a reply on Form Validation Combination Of Fields Must Be Unique • 1 month ago

@douglas_quaid This exactly the reason why you should create a new question ;) Anyway, glad you found my response :D

28th March, 2017

bobbybouwmann left a reply on Mark A Value As "Seen" • 1 month ago

I would pick the pivot table solution. This way you can also save the state of the video (maybe the user watched 2 minutes of the 5 minutes) and so on.

However another solution would be using a json field. This way you can keep an array (json column type) on your user table with all the videos the user has watched so far.

bobbybouwmann left a reply on Nexmo Laravel Package For Sms-notifications Not Working • 1 month ago

Your to is wrong here. It should be this

'to' => $request->phone, // Without the single quotes!

27th March, 2017

bobbybouwmann left a reply on Use Throttle As Metered Paywall • 1 month ago

You want to do more than just throttle the requests right? Currently you can set the throttling only per minute and not per day/week/month. If you want that you need to build your own middleware!

25th March, 2017

bobbybouwmann left a reply on Nexmo Laravel Package For Sms-notifications Not Working • 1 month ago

Can you show some code? Not really sure why you would get above error.

Also have you tried to create the config file yourself?

bobbybouwmann left a reply on Use Throttle As Metered Paywall • 1 month ago

It sounds like you need a new custom middleware for this. The build in throttle mechanism is only a simple implementation for api restrictions. If you want to do more, I suggest you build your own ;)

bobbybouwmann left a reply on Push To Deploy Disabled On WordPress Installs? • 1 month ago

Forge is not made for deploying WordPress sites. You can install a WordPress repository, but that's it. If you want to update stuff you need to do that yourself.

If you want to deploy a wordpress site you simply need to create a new site (not a WordPress site) and deploy that. That also means that you need to have the whole WordPress in version control. So make sure you don't update WordPress or plugins online, otherwise you will have code conflicts.

24th March, 2017

bobbybouwmann left a reply on Validating Date And Time Fields • 1 month ago

It looks like you are better of with a custom validation rule. Check out this answer to give you an idea on how to set it up: https://laracasts.com/discuss/channels/laravel/form-validation-combination-of-fields-must-be-unique/replies/72987

Let me know if you need more help with the implementation ;)

bobbybouwmann left a reply on Form Validation Combination Of Fields Must Be Unique • 1 month ago

Laravel has since my answer changed a bit. It will now throw an exception when the validation fails. See: https://github.com/laravel/framework/blob/5.4/src/Illuminate/Validation/Validator.php#L281

However you can catch this exception of course.

// In your controller

public function store(Request $request)
{
    $rules = []; // Put your rules here

    try {
        $this->validate($request, $rules
    } catch (\Illuminate\Validation\ValidationException $exception) {
        // Do something with the validator  
        // For example

        // Get the failed validation rules
        // Returns an array
        $errors = $exception->validator->failed();
    }
}

This is the work around for this. However Laravel is catching this exception automatically for you and creates a global $errors variable for you, which you can access in your view. If you have the \Illuminate\View\Middleware\ShareErrorsFromSession middleware enabled in your app\Http\Kernel.php middleware group.

If you want to do something else with this my example above would be an option.

23rd March, 2017

bobbybouwmann left a reply on Overriding An Illuminate Package With Fork • 2 months ago

Yeah it's possible.

Just require your fork using the repositories option and then replace the Illuminate\Database\DatabaseServiceProvider::class, with your service provider. Just make sure they have a different name, otherwise you have two classes with the same namespace and class name.

bobbybouwmann left a reply on How Can Use Forge With GCE ? • 2 months ago

You can add a custom server connection using Forge. However Forge is build to set up a server for you on one of the third parties. However GCE is doing the same thing for you.

It should be possible to add a custom server using the "custom VPS" option. You need to make sure that you have a user called root. I'm not sure if GCE will provide you with such a user. If that isn't the case it's currently not possible

22nd March, 2017

bobbybouwmann left a reply on How To Solve CURL Error • 2 months ago

Aah it's locally?

There was a big issue with Ubuntu yesterday regarding this issue. Not sure what it could be locally without extra information

bobbybouwmann left a reply on MethodNotAllowedHttpException In RouteCollection.php Laravel 5.4 • 2 months ago

Your route seems to be wrong! This

Route::put('/channel/{channel}/{edit}',[email protected]');

Should be this

Route::put('/channel/{channel}/edit',[email protected]');

bobbybouwmann left a reply on How To Solve CURL Error • 2 months ago

You need to restart php-fpm or just the whole server depending on your usage with libcurl. For most restarting the server should fix everything.

Automatic updates are great! :D

Edit Your Profile
Update

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