mdecooman

Experience

84,425

25 Best Reply Awards

  • Member Since 4 Years Ago
  • 717 Lessons Completed
  • 32 Favorites

1st June, 2018

mdecooman left a reply on Looking For Recommandations For A New Laptop • 2 months ago

Hi @arukomp

Thanks for your point of view. Your stats do not reflect the reality in my network but we agree that Apple was attractive due to its ecosystem. Apple has never tried to build the fastest machines nor the best of breed stuff despite some of their commercials. They sold a user experience with a strong enough machine with beautiful design and they did it very well. The only mac that I would buy in 2018 is an iMAC (not the Pro which is, to be short, a middle finger to all of their clients).

As for getting a value back when I am done with a mac is not true in my case. They usually die on the scene while acting... It makes me kinda proud and happy for them ;-)

Anyone has a feedback to share on Lenovo ?

mdecooman left a reply on Looking For Recommandations For A New Laptop • 2 months ago

@uF4No Thanks a lot for your detailed explanation. Will have a look at it :)

31st May, 2018

mdecooman left a reply on Laravel Session Conflict Sometimes (Weird Issue) • 2 months ago

Without knowing much of your app. Try to check your authentication process knowing that your user may have activated the 'remember me' token. That would explain the login as admin, as if they didn't logged out properly, it timed out, and then trying to access the page it takes the remember token and cookie info, etc.

Look as well in the data in your session and cookies when a user logs in with different credentials and from different browsers.

It may give you more insights. As a rule of thumb, with laravel, I always try to stick with what it offers out of the box for ACL and auth. Customizing as needed instead of plugging in another package has always helped me to upgrade fast to the latest releases. Anyhow, hope you find your culprit.

mdecooman left a reply on Looking For Recommandations For A New Laptop • 2 months ago

@martinbean Oh yeah, true. But still, don't expect much from this one.

mdecooman left a reply on Looking For Recommandations For A New Laptop • 2 months ago

Ah, I forgot to tell that my usage is for graphic design (Affinity or Adobe Suite), A bit of lightwave 3D for modeling (not rendering) and mainly for dev (Visual Studio/ IntelliJ products)

mdecooman started a new conversation Looking For Recommandations For A New Laptop • 2 months ago

Hi falks,

Using Macbook Pro since their release and my current one is a 2015 model. Still happy with it and will continue to use it till its last breath... But seems that Apple is not ready to show some love for the next versions maybe it is time to prepare a transition and spend money elsewhere. For about 3300 EUR (price of a mackbook pro in Europe) I guess we can have better deals elsewhere. And buying an iMac is not really portable ;-)

So Voila. I was a big fan of Dell (XPS or Precision) but it was ages ago. I heard Lenovo have good models too. Any feedback welcome! Thank you

16th March, 2018

mdecooman left a reply on Forge Support? • 5 months ago

Weird that we need to hunt for support. Nothing on forge is mentioning either BeSnappy or any other tool apart from the support widget (and why should we care?). Emails are definitely not a snappy channel.

Happy to support Laravel through Forge but I would better make a donation and go back to the DIY realm. Very frustrating tbh.

6th February, 2018

mdecooman left a reply on Pusher Not Working, No Push Notifications, Is Echo Working At All? • 6 months ago

Seems like an event implements ShouldQueue but the queue is not processed, that means you need to start your queue.

A way to do it is from a terminal session

php artisan queue:work

27th January, 2018

mdecooman left a reply on Laravel 5.5 For The Next 5 Years • 6 months ago

@zaster

Maybe you overthink a bit... ;-)

As an example, let say you start a project for a client with a version of the framework at a time T. If the project will last 1 year, you can expect 2 releases of Laravel.

Since you started with a LTS version, you can reassure yourself on the security issues or support. You want to be consistant and homogeneous in your project so no need to get fancy and change your codex and update with every release.

The fact to upgrade an old project is mainly depending of being paid for it or having the time and a good rational behind the decision...

You also talk about "ordinary features" but since your client is also defining those "ordinary features" with you, it will depend on the needs, new trends, budgets, good communication and limitations of the "old" versions if any. Since you use PHP, you can always decide if an upgrade solves the issue and outweighs the other aspects.

5 years is very relative. A startup will forecast in months when most of the existing businesses can forecast in years so 5 years is not unrealistic at all. I just shutdown a project that could not run with a PHP version above 5.3. The project DID NOT need to upgrade despite security risks and so on... It was a business decision and it is not up to the dev alone to make it.

Look at the lifespan of Symfony 1 projects... some are still running and do their job. Laravel is a great framework and since it uses PHP7, you are on the safe path I would say.

As a developer, eager to learn, we can be frustrated to see new things that could be helpful but, eventually, will not be able to use before the next project. That brings us to a risk of multiple identity disorder, but let's not talk about myself ;-)

As a developer, we can be tempted to do 'composer update' as a daily routine. We can take too long to decide what packages to use. We spend way too much time on twitter, Slack, or else... jumping from one to another articles, listening podcasts and we finally finish our days watching series procrastinating and tired of all that information... (ok I was probably talking about me a little).

At the end of the day is not really the tool that matters but more about the problem we solve. So you better master your "software development" skills along with the tools you use, knowing their limits and understanding their internals. The tools will change, always.

Happy learning and best regards.

24th January, 2018

mdecooman left a reply on WISIWYG Editor • 6 months ago

Quill JS is quite powerful and their documentation is really good.

A VueJS component also exists here:

18th January, 2018

mdecooman left a reply on Mystery Error In View • 7 months ago

Just by curiosity:

$office->company->name;
$office->city->name;

What happens if you comment these?

mdecooman left a reply on Mystery Error In View • 7 months ago

in your controller, what do you get if you dump the variables?

dump($totalOfficesCount);
dd($offices);

mdecooman left a reply on 2018- Best Hosting (subjective) • 7 months ago

Digital Ocean is an easy sell for clients concerned by the hosting quality but not ready to pay expensive SLAs.

Some of my clients are using https://www.gandi.net and don't want anything else...

I also use(d) OVH since almost the beginning of their existence but have migrated all my projects on DO. I keep an eye though.

mdecooman left a reply on Cant Wrap My Head Around Markdown Mailables • 7 months ago

Ah I answered too slow ;-)

Anyway without seeing your Mailable view, it is a bit weird to imagine how you made it work.

BR

mdecooman left a reply on Cant Wrap My Head Around Markdown Mailables • 7 months ago

Ah, got it...

The original message.blade.php component is:

@component('mail::layout')
    {{-- Header --}}
    @slot('header')
        @component('mail::header', ['url' => config('app.url')])
            {{ config('app.name') }}
        @endcomponent
    @endslot

    {{-- Body --}}
    {{ $slot }}

    {{-- Subcopy --}}
    @isset($subcopy)
        @slot('subcopy')
            @component('mail::subcopy')
                {{ $subcopy }}
            @endcomponent
        @endslot
    @endisset

    {{-- Footer --}}
    @slot('footer')
        @component('mail::footer')
            © {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
        @endcomponent
    @endslot
@endcomponent

You have removed the {{ $slot }}. Not good. since needed when you invoke the message component in your Mailable view, example below.

All elements that are enclosed in the @component('mail::message') will endup in the slot.

@component('mail::message')
# Welcome!
Your Facebook Account was linked
@include('emails.social._linkedSocialAccounts')

@component('mail::button', ['url' => 'http://site.com'])
    Sign in to Blah!
@endcomponent

Thanks,<br>
{{ config('app.name') }}
@endcomponent

To make it simple, just modify the footer in the message.blade.php and then inject the body in your Mailable view unless you have common things for all.

Hope it helps.

mdecooman left a reply on Cant Wrap My Head Around Markdown Mailables • 7 months ago

Hi @ecomail

Where do you get this # {{__('emails.digest.header')}} ?

I guess you want to include the view 'emails.digest.header' so I would rather write:

@include('emails.digest.header')

The make sure you add all the variables you need for your views in the constructor of your Mailable.

You asked about having a different footer but then you talk about the body... o_O ahem... all the best :)

15th January, 2018

mdecooman left a reply on Shared Hostling - Error When Trying Insert Something To Database • 7 months ago

Hi @paklic9

The credit card was just a way to say that your application is not required to be that secure (as a guess). If it were, yes that would be a bad idea...

Checkout https://www.vultr.com/pricing/ They have VPS starting at 2,5 USD/month, maybe someone from your family can "sponsor" you.

You can tinker with Laravel Homestead, (Vagrant, VirtualBox and Linux).

Happy learning.

mdecooman left a reply on Shared Hostling - Error When Trying Insert Something To Database • 7 months ago

@paklic9

Not having an .env file and putting all settings hardcoded in the code is a security issue since I guess you push your config files in your repo (Git, Bitbucket, etc...). Leaking information where it could be avoided is always a bad idea. Now if you are the only one touching it, I guess you can live with it. Your application is not collecting credit cards right? ;-)

You SHOULD not have to put a chmod 777 on any folder ever. Seems you have a good new resolution for 2018 to improve your skills in that area. If you have precise questions along the way feel free to ask.

Best

mdecooman left a reply on Foreign Key Constraint Is Incorrectly Formed • 7 months ago

@siusiak1000 did @NowAndHere solved your problem? Would be nice to mark his/her answer as the correct one so this threat is shown as solved. Best

mdecooman left a reply on Laracast Testimonials • 7 months ago

@SalmanPatnee

Just ask him on Twitter...

mdecooman left a reply on Using FormRequest To Power Routes • 7 months ago

@beerbuddha Taylor actually answered it:

$query = Order::newQuery()

https://twitter.com/taylorotwell/status/951857437241376768

mdecooman left a reply on Laravel Can't Update Data When Using SQL Server Database On Ubuntu • 7 months ago

@sonicitiskg

Can you write and run a copy of the update query manually on your Ubuntu and see what you get? That should give you some answers.

mdecooman left a reply on Shared Hostling - Error When Trying Insert Something To Database • 7 months ago

@paklic9

Make sure you address all the needed config that were in the .env file. I.e.: your database, see if you put all the correct info in config/database.php

24th November, 2017

mdecooman left a reply on Error Updating Laravel 5.4 • 8 months ago

Hi @ncarreno

I guess you tried but did you removed your vendor directory and composer.lock file and run composer install again?

It can be a dependency (like laravel-mix or else) that was working in the previous version but requires you to update your composer.json with the newest version too. Install a new laravel somewhere and compare the composer.json to get a hint.

Best

20th November, 2017

mdecooman left a reply on Getting The Correct Mimetypes When Uploading Files • 9 months ago

Hi @robrogers3,

Thank you for your answer. No issues extending validation in L55 but I do search for another solution.

I believe it is more the responsibility of the (UNIX) host to deal with this instead of tweaking the code for each case. In this example a CDR file has an existing standard like Adobe has for most of its files. I don't want to maintain my own versions when it can be dealt otherwise.

Laravel/Symfony registers 2 guessers by default: FileBinaryMimeTypeGuesser and FileinfoMimeTypeGuesser. They both implement the MimeTypeGuesserInterface. The choice than is to either re register the one I prefer and customize it or create a new one.

Digging further...

19th November, 2017

mdecooman left a reply on Getting The Correct Mimetypes When Uploading Files • 9 months ago

Hi @tykus

Thanks for your answer. I guess you meant 'mimes' but the content-type is still checked (expected behaviour). A CorelDraw file, for example, is not recognized and therefore Laravel/Symfony falls back to an application/octet-stream type.

Putting application/octet-stream in the rule would defeat the purpose. Editing the nginx mime.types doesn't change anything.

Building custom validation based on, ie, this: http://pastebin.com/raw/NcL5BLwg seems an overkill. I can't believe this trivial requirement has not been met somehow.

PS: the fact that some ai file are recognised as pdf can be normal (depending on how you save your ai file) The problem still remains for other files like from CorelDraw.

mdecooman left a reply on About View Composers - Cannot Get It To Work - Laravel 5.5 • 9 months ago

Hi,

You can't register this in your config/app.php. Try to follow the guide here: https://laravel.com/docs/5.5/views#view-composers Come back to ask for help if you are stuck.

Best

mdecooman left a reply on Carreer Advice • 9 months ago

And for your future employer, let them know you like both... it may help you to get a job faster.

mdecooman left a reply on Carreer Advice • 9 months ago

Choose a company you like and would enjoy working for. Then you will use whatever they use (PHP or .Net or Python or something fancier). If you don't know what company, just try to imagine what kind of product you would like to build, etc.

The debate about PHP or .Net is irrelevant IMHO.

mdecooman started a new conversation Getting The Correct Mimetypes When Uploading Files • 9 months ago

uploading file get the wrong mimetypes.

Coreldraw files cdr are recognised as application/zip
Illustrator ai is recognised as pdf

so basically I need to put in my validation rules:

//application/postscript is useless in this case

'file' => 'required|file|mimetypes:application/zip,application/pdf

Anyone could point me to the right direction?

Thanks

13th November, 2017

mdecooman left a reply on On Production Server Laravel Project Giving (1/1) TokenMismatchException • 9 months ago

Hi @krishna9720

Do you have a SESSION_DOMAIN key defined in your env file? Make sure to match the correct domain or just remove it (default to null)

Is this a permission issue on your directories where the session files are supposed to be saved?

3rd November, 2017

mdecooman left a reply on RefreshDatabase Trait Doesn't Refresh Database • 9 months ago

@rudexpunx

You mean MS SQL Database? Is there a limit on the number of connections?

For my tests I use exclusively in memory DB (whatever the connection) assuming Eloquent will work on any SQL flavor (checking the issues on Github).

<env name="DB_DATABASE" value=":memory:"/>

mdecooman started a new conversation Record And Replay API Responses • 9 months ago

Hello,

How do you do to mock some API answers (ie from Stripe) and keep their class information like a Stripe Collection of Plans?

I am building a solution with Laravel Cashier (TDD style) and would love to hear from your experience.

Thank you

1st November, 2017

mdecooman left a reply on Page Reloads After Form Request • 9 months ago

Refresh your browser as well (Ctrl+F5 on win and shift+cmd+R on mac)

mdecooman left a reply on Page Reloads After Form Request • 9 months ago

<form>
        <input v-model="bericht">
        <button type="submit" @submit.prevent="send'>Verzend naar de server</button>
</form>

mdecooman left a reply on Page Reloads After Form Request • 9 months ago

Hi @Rainieren

This should help...

<form @submit.prevent="send">

mdecooman left a reply on How To Avoid The Same "import" Across Multiple Files In Vue • 9 months ago

And for other JS scripts or Vue components, I build them adding the specific script for each pages. Once they work as expected, I refactor to extract common behaviors if any and compile them accordingly.

mdecooman left a reply on How To Avoid The Same "import" Across Multiple Files In Vue • 9 months ago

You mean this?

import VueResource from 'vue-resource'
import vueFilter from 'vue-filter'
Vue.use(VueResource)
Vue.use(vueFilter)
Vue.http.headers.common['X-CSRF-Token'] = document.querySelector('meta[name="csrf-token"]').getAttribute('content')

You add it too in your app.js or bootstrap.js. That said, you can extract big vendor files as explained in the doc: https://laravel.com/docs/5.5/mix#vendor-extraction (to preserve the cached files that do not need to change)

Now if you need specific functions that apply only to certain components (you can always write them in their own files and folders and import them when required. But to be frank I only do that once my application grow bigger as I can start to monitor the performances and load of each pages. Doing it at the beginning may become overwhelming and ask you to take decisions based only on brittle assumptions.

I hope I understood your question and helped with my answer.

mdecooman left a reply on What's The Point Of 'in-lining' Strings? • 9 months ago

Hi @thebigk

Like @Nash says it is first a personal preference.

I would add that the inlining avoid me to make stupid errors and improves readability. Especially after hours spent on the monitor.

In this case it also look more alike the routes you define and therefore improves coherence and help your brain a little (well it helps mine a lot).

The most important is to stay coherent and apply the same style through all your code (IMHO).

Hope it helps :)

mdecooman left a reply on How To Avoid The Same "import" Across Multiple Files In Vue • 9 months ago

Hi @Dima

When you install a fresh Laravel. The bootstrap.js in your resources folder has it:

window.Vue = require('vue');

You do not need to import it again assuming you use Laravel Mix (installed with Laravel) and have you webpack.mix.js configured (default config is enough to start):

mix.js('resources/assets/js/app.js', 'public/js')
    .sass('resources/assets/sass/app.scss', 'public/css');

Compile your resource in the terminal

npm run dev

Then attach your app.js to your master template (ie app.blade.php)

<script src="{{ asset('js/app.js') }}"></script>

So as you mentioned, you add the generic stuff in your bootstrap.js or app.js and voila.

Hope it helps

Best

mdecooman left a reply on Refactoring A Test For User Registration • 9 months ago

Hi @haakym

Instead of using the assertDatabaseHas (I even didn't know about it), I use as follow:

Mail::assertQueued(ConfirmYourEmail::class);
$user = User::whereEmail('[email protected]')->first();
$this->assertFalse($user->confirmed);

The in the model I also use a casts to make sure this attribute is interpreted as a boolean

protected $casts = [
        'confirmed' => 'boolean'
    ];

Within the same test class you may want to separate your tests. 1 to check a_user_can_register, a second like a_user_receives_an_email_asking_confirmation_upon_registration, etc.

Don't focus to much on a single class test, better to come back later with a fresh mind if even necessary. I used to procrastinate too much on some of my tests, avoiding to move forward with the features I needed to develop.

Hope it helps

Best

mdecooman left a reply on Query: Authenticated User's Post's Comment. • 9 months ago

Well, it is an enjoyable path. ;)

mdecooman left a reply on Passing Variable(&) In Url • 9 months ago

Is it an issue with a string missing a conversion to an int within your 'doSomething'? if you dump the variable $age, what do you get?

mdecooman left a reply on Query: Authenticated User's Post's Comment. • 9 months ago

Hi @msyaukat

You may want to read about the has many through relationship: https://laravel.com/docs/5.5/eloquent-relationships#has-many-through

Best

2nd October, 2017

mdecooman left a reply on PhpStorm • 10 months ago

@NadeemAkhter use the EAP versions:

https://www.jetbrains.com/phpstorm/nextversion/

Also read here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206347239-Is-PhpStorm-EAP-Free-

If you are making money from development, I would highly suggest to buy your license or get Netbeans or Visual Studio Code which are free. If you study or want to try, the EAP will do just fine.

mdecooman started a new conversation Sharing Experience With The Package Analogue ORM? • 10 months ago

Hello,

Anybody has any experience to share about using this nice package from @RemiC ? Could you share your thoughts and experience?

Thank you :)

13th September, 2017

mdecooman left a reply on Asset() Behaving Strangely • 11 months ago

Hi @Snapey

Nothing to see in the debugs. When setting the asset with 'storage/' or not, it gives the same result. The request comes back with a 200 response and the href are respectively with or without 'storage' in the URI. The image is displayed in both cases while the image is always in the folder storage/app/public/rendered/image.png

...weird.

12th September, 2017

mdecooman left a reply on Asset() Behaving Strangely • 11 months ago

The only explanation has to come from the http server valet. So if someone can enlighten me that would be great :)

If not I will probably suffer from PTSD, ok probably not...

mdecooman left a reply on Asset() Behaving Strangely • 11 months ago

yes... the server is not the issue. Does asset() delivers images if they are in a subfolder and this subfolder is not specified as an argument?

mdecooman started a new conversation Asset() Behaving Strangly • 11 months ago

On my machine the view renders the image with either of these

<img class="card-img-top" src="{{ asset('storage/'. $image) }}">

and

<img class="card-img-top" src="{{ asset($image) }}">

But when deployed only the first one works (as I would expect. SO my question is why on my local machine, the image is rendered?

config: Laravel 5.5 and my configuration file is basic, I only changed the APP_URL in the environment file accordingly. The php artisan storage:link was run and the symlinks are working as expected too.

Not a show stopper but when something 'magic' happens on your local machine you get curious...

Anyone run into the same weird behaviour?

:)

Edit Your Profile
Update

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