際際滷

際際滷Share a Scribd company logo
Welcome!
DevisePresentation forthe
AlpharettaPHP/ Laravel
Group
January27th, 2015
So,whoam I?!
Name:
GaryWilliams
損 Cannot grow a beard.
損 Co-owner at LogicBomb Media
損 Co-creator of Devise
損 Twitter: @dolbex
損 Made the guy to the left
Why dowe
Disrupt?
This guydisrupts.
Ifhe can do itwe can do it.
------------------------------->
So much going on...
So much
Theteam
DemoTime
Whatwewantedtoaccomplish:
損 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....
Iwantto murder
Wordpress
Tools
Basic contentmanagement
損 Images
損 Videos (Zencoder)
損 WYSIWYG (CKEditor)
損 Maps
損 Audio
損 Color Pickers
損 and loads more....
Howdid I dothatearlier?
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>
AvoidaBajillionarrows
Add 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'emAll
Don'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 Updating
This 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=/slideshow/devise-presentation-for-alpharetta-php-laravel-group/43991511/"..." width="100">
Editing Models
Just One
@php $user = DvsUser::鍖nd(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]
AsaSingleAttribute
@php $user = DvsUser::鍖nd(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.
Whatisthe schedule
0.8
Accepting Github issues
0.9 - By16th ofFebruary
Migrate to Laravel 5, open Github issues
1.0 - By16th ofMarch:
Installer, ready for upgrades, begin accepting pull
requests
Getstarted
DeviseWebsite / Docs
Devise on Github
Devise Example Project
Questions?

More Related Content

Devise | Presentation for Alpharetta PHP / Laravel Group

  • 4. Name: GaryWilliams 損 Cannot grow a beard. 損 Co-owner at LogicBomb Media 損 Co-creator of Devise 損 Twitter: @dolbex 損 Made the guy to the left
  • 6. This guydisrupts. Ifhe can do itwe can do it. -------------------------------> So much going on... So much
  • 9. Whatwewantedtoaccomplish: 損 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....
  • 11. Tools Basic contentmanagement 損 Images 損 Videos (Zencoder) 損 WYSIWYG (CKEditor) 損 Maps 損 Audio 損 Color Pickers 損 and loads more....
  • 12. Howdid I dothatearlier? 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>
  • 13. AvoidaBajillionarrows Add 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>
  • 14. Collect'emAll Don'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
  • 15. Live Updating This 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=/slideshow/devise-presentation-for-alpharetta-php-laravel-group/43991511/"..." width="100">
  • 16. Editing Models Just One @php $user = DvsUser::鍖nd(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
  • 17. [continued] AsaSingleAttribute @php $user = DvsUser::鍖nd(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>
  • 18. 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.
  • 19. Whatisthe schedule 0.8 Accepting Github issues 0.9 - By16th ofFebruary Migrate to Laravel 5, open Github issues 1.0 - By16th ofMarch: Installer, ready for upgrades, begin accepting pull requests
  • 20. Getstarted DeviseWebsite / Docs Devise on Github Devise Example Project