IntroductionIntroduction

Chock full of tips.

Welcome to another issue of Craft Link List. Once again this issue overflows with content created by the Craft community. This is a great place to hang out.

If you made it to Peers Conference the two decks in the top stories section will be familiar to you already. They are Brandon's presentations on Craft 3 and plug-in development for Craft 3. Good stuff there. You'll also find all the links, plugins, bits and bobs that fill a regular CLL issue.

There are also three sponsors for this issue!

  • Mijingo has a new course on Git. I'm a customer myself. It's good course.
  • DesignKarma is ready to help with your next Craft build. Check out their blog and you'll find lots of Craft know-how.
  • Solspace wants to let you know about Freeform, the powerful and flexible form build. You use forms, right? There doesn't seem to be form need this can't cover.

Thanks for sponsoring, sponsors!

Enough talk. Let's hit the links.

-John Morton

Craft Link List  

Top Stories


News

Featured Sponsor

Tools, tips and fundamentals



Disable CSRF verification for select plugin controllers in Craft 3

Craft's Cross-Site Request Forgery protection, aka CSRF, is an important security feature. How do you enable it in Craft 3?

Here's a bit from Slack on that topic:

[Enable it by] either by setting this on the Controller class:

public $enableCsrfValidation = true;

or if you only need to disable it for certain actions:

    {
        if (in_array($action->id, ['foo-bar'], true)) {
            $this->enableCsrfValidation = false;
        }

        return parent::beforeAction($action);
    }
Craft Link List  






Optimizing your already-existing Craft 3 composer.json file.

A note from Brandon in case you've been building sites with the Craft 3 beta. (This affects you if you have created your Craft 3 site before this commit. If you fall into this category you need to update your composer.json manually. ) :

Composer has a optimize-autoloader config setting that will get it to generate a class map each time dependencies change (gives you a 2X performance boost). https://getcomposer.org/doc/06-config.md#optimize-autoloader

I've added it to the craftcms/craft project's composer.json (https://github.com/craftcms/craft/commit/90acb326a8ef14e75660566ef7576836a6e0b2f9) so any Craft projects created with that going forward will get this automatically. Existing Craft 3 projects should add it manually.

Craft Link List  

Perfecting your technique






Sponsor


Plugged In










The Craft Advantage



Overheard

It’s not Craft, but it’s interesting.