devise | presentation for alpharetta php / laravel group

21
Welcome!

Upload: gary-williams

Post on 17-Jul-2015

187 views

Category:

Internet


2 download

TRANSCRIPT

Welcome!

DevisePresentation for the Alpharetta PHP / Laravel GroupJanuary 27th, 2015

So, who am I?!

Name:

Gary Williams» Cannot grow a beard.

» Co-owner at LogicBomb Media

» Co-creator of Devise

» Twitter: @dolbex

» Made the guy to the left

Why do we

Disrupt?

This guy disrupts.If he can do it we can do it.

------------------------------->

So much going on...

So much

The team

Demo Time

What we wanted to accomplish:» Can use on most of our projects

» Remove much of the repetition

» Focus on a single platform and embrace Laravel

» Give back to the open source community

» Finally... and possibly the most important reason....

I want to murder

Wordpress

ToolsBasic content management

» Images

» Videos (Zencoder)

» WYSIWYG (CKEditor)

» Maps

» Audio

» Color Pickers

» and loads more....

How did I do that earlier?Drop in attributes roughly where they appear in the markup.

<p data-devise="[pagePropertyName], [type], [label]">{{ $page->pagePropertyName->text or 'Placeholder when null' }}</p>

'Real' example

<h1 data-devise="title, text, Title of the Page">{{ $page->title->text or 'Placeholder when null' }}</h1>

Avoid a Bajillion arrowsAdd a group to.... you know... group 'em

<h1 data-devise="pageTitle, text, Title of the Page, Main Guts">{{ $page->featuredEvent->text or 'Placeholder when null' }}</h1>

<div data-devise="bodyOfThisBeast, wysiwyg, Body of the Page, Main Guts">{{ $page->bodyOfThisBeast->text or 'Placeholder when null' }}</div>

Collect 'em AllDon't know how many you need but don't need a model? Make it a collection.

@foreach($page->events as $event)

<h3 data-devise="events[title], text, Title of the Page, Coffee House Events, Edit Many Events"> {{ $event->text or 'Placeholder when null' }}</h3>

<div data-devise="events[description], wysiwyg, Description of the Event, Coffee House Events, Edit Many Events"> {{ $event->text or 'No Description' }}</div>

@endforeach

Live UpdatingThis is still in development - be gentle

<!-- Will update the color of the text --><p data-devise="textColor, color, Color of the Text">Some Text</p>

<!-- Will update the background color of the text --><p data-devise="textColor, color, Color of the Text, null, null, backgroundColor">Some Text</p>

<!-- Will update the width attribute of the tag --><img data-devise="imageWidth, text, Resize that Sucker, null, null, attribute:width" src="..." width="100">

Editing ModelsJust One

@php $user = DvsUser::find(2); @endphp<div data-devise="$user, Edit the User"> {{ $user->email }} has an id of {{ $user->id }}</div>

Groups

@php $users = DvsUser::where('id', '<', 4)->get(); @endphp@foreach ($users as $user) <div data-devise="$user, User $user->id, Edit Users"> We might want to edit user {{ $user->id }} inside a group. </div>@endforeach

[continued]

As a Single Attribute

@php $user = DvsUser::find(2); @endphp<div data-devise="$user->email, Edit the User Email"> So... {{ $user->email }} has an id of {{ $user->id }} but you already knew that right?</div>

Advanced concepts» Quickly map class methods to page variables

» Easily build and implement weird-o permissions

» Page versions

» Localization engine

» Image gallery

» Users, groups, login, permissions all build in and ready to go.

What is the schedule0.8

Accepting Github issues

0.9 - By 16th of February

Migrate to Laravel 5, open Github issues

1.0 - By 16th of March:

Installer, ready for upgrades, begin accepting pull requests

Get startedDevise Website / DocsDevise on GithubDevise Example Project

Questions?