TODOParrot is the companion project for the book

Overview

Welcome to TODOParrot

TODOParrot (http://www.todoparrot.com) is the companion project to the book, Easy Laravel 5 (http://easylaravelbook.com), written by bestselling author W. Jason Gilmore. Feel free to use the TODOParrot code as a learning aide, and if you'd like to learn even more about Laravel head on over to EasyLaravelBook.com and find out what the book has to offer!

Useful Features for Laravel Newbies

If you're new to Laravel consider paying particular attention to the following TODOParrot features:

  • Blade Templating: A simple master layout is used to wrap the application (resources/views/layouts/master.blade.php). Nothing particularly advanced here but a useful example nonetheless.
  • Model Relations: TODOParrot users can have many lists, and each list can have many tasks. These relations have been integrated into the User, Task, and Todolist models.
  • Forms Integration: The new Laravel 5 Form Request feature is used for creating new lists and tasks. Check out for instance how the app/Http/Controllers/ListsController.php, app/Http/Requests/ListCreateFormRequest.php, and resources/views/lists/create.blade.php files work together to add a new list to the database.
  • Eloquent Integration: The eloquent ORM is used to query and manage database data.
  • Database Seeding: Inside database/seeds you'll find a working seed example involving the Category model. This model and corresponding table aren't actually used yet, but they exist and the CategoryTableSeeder.php demonstrates how to seed the table.
  • Model Methods: I added a few helper methods to models to cut down on redundant code. For instance, the Todolist model includes a remainingTasks method used to easily determine how many incomplete tasks remain for a given list.
  • Custom Middleware: The native Authenticate middleware is used in the application, as is a custom middleware named ListOwnershipMiddleware.php, which determines whether the current user is allowed to view and edit specified lists. Additional custom middleware (AdminAuthentication.php) is used to restrict access to the administration panel.
  • User Authentication: TODOParrot uses the sweet new Laravel 5 authentication features. Users can create a new account, sign in, sign out, and recover their password.
  • Unit Testing: You'll find a few simple test-related examples in the tests directory.
  • Bootstrap Integration: TODOParrot uses the Bootstrap framework and a modified Bootswatch theme. Laravel Elixir is used to integrate Bootstrap via the npm bootstrap-sass module and easily override various stylings.

TODOParrot is a Work in Progress

As LinkedIn founder Reid Hoffman famously said, "If you are not embarrassed by the first version of your product, you've launched too late." TODOParrot was created solely with the intention of helping fellow developers get acquainted with Laravel 5 features and Laravel in general, so it's silly for me to not just release what's in place now because even if not finished there's still plenty to learn from.

Future versions will include:

  • LESS Integration with Elixir: In the interests of time I just pushed my pre-existing Bootswatch template directly into public/css. DONE!
  • Route Model Binding: Route model binding is a much cleaner way to handle boilerplate tasks.
  • Much More Testing: Plenty to do here
  • User Preferences: I'd like to add some simple customization capabilities such as e-mail notification when a task date expires.
  • An Administration Console: The console would allow administrators to view all user accounts and lists. DONE!
  • E-mail Task Reminders: Would e-mail users when a task due date nears using the command scheduler.
  • A Command Bus Example: It would be cool to demonstrate how to create lists via e-mail.

Installing TODOParrot

To install TODOParrot you can clone the repository:

$ git clone https://github.com/wjgilmore/todoparrot.git 

Or if you're not familiar with Git (you really should learn), you can download the zip file. After downloading the file, unzip it to a convenient location.

Next, enter the project's root directory and install the project dependencies:

$ composer install

Next, configure your database (config/database.php). See Chapter 3 for more details about database configuration. Once complete, create the database and then run the migrations:

$ php artisan migrate

Next, seed the database:

$ php artisan db:seed

Finally, fire up the PHP development server (php artisan serve) or navigate to the appropriate Homestead URL and play around with the application!

I'm still working on the unit tests however several are already in place. If you'd like to run the tests you should first create a test database and then assign that name to the phpunit.xml DB_DATABASE environment variable. You can run them by executing the following command from the project root directory:

$ vendor/bin/phpunit

Frequently Asked Questions

Why did you implement ______ this way?

I rebuilt the early test version of TODOParrot over two frenzied afternoons after finishing the book. Some of the code needs to be refactored and can be improved. But most of what you find in the code should nonetheless be pretty helpful in terms of learning more about Laravel.

Can I adopt the code for my own purposes?

Yep as long as you abide by the terms of the license.

Can I ask you questions?

Yep. E-mail me at [email protected].

Do you offer book discounts?

Sometimes. To celebrate the availability of this companion project, I've embedded this easter egg here, good for 20% off the book when purchasing via Gumroad or Leanpub. Use the code easteregg when checking out to receive the discount. Head over to http://easylaravelbook.com for more information about the book and for purchase links.

Your code is just plain wrong

That doesn't surprise me one bit. Send me a pull request.

License

TODOParrot is licensed under the MIT license. If you find something wrong with the code or think it could be improved, I welcome you to create an issue or submit a pull request!

The home page image is copyright 2014-2016 W. Jason Gilmore ([email protected]). It may not be used for any purpose without express written permission from its copyright holder. Also, please do not use the name TODOParrot. I kind of like it.

Comments
  • route:list error

    route:list error

    I'm a new comer to laravel. start learning it 2 days ago. i've installed TODOParrot on my machine and it run as on your website I found an error when trying to get list of routes. 'namespace' => 'admin' in routes.php causing that error. PHP os case sensitive, isn't it? 'Admin' folder inside Controllers writen with capital 'A'

    opened by sembrex 3
  • trying to access the admin panel

    trying to access the admin panel

    Hi, first of all thank you for providing this project as opensource. I think that it'll be quite helpful for me.

    I could install, steup and log in to TODOParrot. Although accessing the admin panel does not work for me. I set in the database the field is_admin to 1 but although I can't access ipaddress/admin ( I saw that it should be admin looking into the routes.php) ipaddress/contact doesn't work either but ipaddress/about does

    Any hints?

    I use the latest lavarel version 5.1.x.

    opened by jopi2016 1
  • A better way to do the slugging (sure is better)

    A better way to do the slugging (sure is better)

    Hi there I have had problems using the package Cviebrock\EloquentSluggable Problems start when you try to incorporate it, the book says to add: 'Cviebrock\EloquentSluggable\SluggableServiceProvider', to the providers. However using 5.1 they use ::class in every line, that's prolly alright with 5,0 but it took sometime to implement it on 5.1 (I actually added ::class and it worked) However when I did the 'implement' step, I know from my Java programming background that you should implement all the methods the interface has in order to use the class, phpstorm complained about it, but still I managed to do the trick in 5.0 and it created a column in the database and it worked sluggifying each entry into it. However in page 100 you find that you need 5.1 (for sake of using the faker factory) so I abandoned project straightaway and did a fresh 5.1 installation.

    Now, there it simply refused to budge and all stopped working, so I came up with this neat solution.

    First here's the method to track back on the last steps.

    1- First remove the published vendor by deleting the files copied by composer, 2- then remove the $sluggable variable from the Todolist class. 3- then remove the migration file ... (had to adjust the autoload.php file otherwise couldn't delete it) 4- then I removed the provider from config/app.php 5- then I removed the slug column from the database. 6- then I removed the entry from composer.json 7- then did composer update to adjust everything, now this package has been wiped out.

    To do it my way 1- Create a migration file to add the slug column 2- then migrate to get your table adjusted, then simply use tinker to

    foreach($lists as $list) { ... $list->slug = str_slug($list->name, "-"); ... $list->save(); ... } => null

    the table has been populated with just use the str_slug helper function to get your reward as above.

    I hope this helps other uses

    opened by unclepickles 1
  • No input file specified.

    No input file specified.

    Dear, I followed and configured todoparrot all step as the guide. But when I run homestead.app or 192.168.10.10, I just get a message "No input file specified.". When I tried to run in local by using "$php artisan serve", the website worked perfectly. So just the homestead have problem. I try some ways to solve the problem such as reload homestead, check nginx (start/reload), but the problem still here. I don't know how to solve yet.

    opened by tuancode 1
  • Regarding the ContactFormRequest ... a small error

    Regarding the ContactFormRequest ... a small error

    hello all

    during creation of the form, the author injects JavaScript like so:

    {!! Form::textarea('message', null, array('required', 'class'=>'form-control', 'placeholder'=>'Your Message')) !!}

    The first element of the array which takes in (required, class, placeholder), the first element creates a javascript snippet which will then stop you from submitting the form when you click Submit if any of the three fields are blank which means that you never get to check requirements versus the laravel method using the class.

    The work around is simply to remove the element from the array to become:

    {!! Form::textarea('message', null, array(''class'=>'form-control', 'placeholder'=>'Your Message')) !!}

    This way you get to see the Request object in action.

    Thanks

    opened by unclepickles 0
Owner
Jason Gilmore
Developer, consultant, and adviser. CTO, Dreamfactory Software. Author of ~10 books on PHP, including the bestselling Easy Laravel 5. CodeMash co-founder.
Jason Gilmore
Mini is a small Laravel application with 2 modules to go with the book Laravel: The Modular Way

Mini Mini is a small Laravel application with 2 modules to go with the book Laravel: The Modular Way Install Clone this repo git clone [email protected]:

David Carr 5 Dec 4, 2022
Book Store Website Design Using PHP, JavaScript, CSS

Book_Store_Website Book Store Website Design Using PHP, JavaScript, CSS PHPMyAdmin Tables SELECT id, name, email, password, user_type FROM users WHERE

Sashen Jayathilaka 22 Dec 21, 2022
Cakephp-book allows you to search in the official CakePHP documentation directly from the console.

CakeDC/Book plugin for CakePHP cakephp-book allows you to search in the official CakePHP documentation directly from the console. Requirements CakePHP

Cake Development Corporation 3 Apr 13, 2022
mini Project in Laravel and vue js. Real World Laravel 8x + vue js Dashboard.Task management and project management system

mini Project in Laravel and vue js. Real World Laravel 8x + vue js Dashboard.Task management and project management system. Dashboard features such as: Complete Dashboard, Custom Authentication, Email Verification, custom-login-register-forgot password (without jetstream).

Hasmukh Dharajiya 2 Sep 20, 2022
DooTask is a lightweight open source online project task management tool that provides various document collaboration tools, online mind mapping, online flowcharting, project management, task distribution, instant IM, file management and other tools.

DooTask is a lightweight open source online project task management tool that provides various document collaboration tools, online mind mapping, online flowcharting, project management, task distribution, instant IM, file management and other tools.

kuaifan 3k Jan 5, 2023
Self hosted project management and collaboration tool powered by TALL stack

Sponsored By: Self hosted project management and collaboration tool inspired by basecamp. Notice: Project under some major change, do not use until st

iluminar 1.8k Jan 6, 2023
:panda_face: Jitamin is a free software written in PHP, intended to handle the project management over the web. QQ群: 656868

Jitamin Jitamin (pronounced /ˈdʒɪtəmɪn/) is a free software written in PHP, intended to handle the project management over the web. Jitamin is inspire

jitamin 916 Dec 14, 2022
Kanban project management software

Kanboard Kanboard is project management software that focuses on the Kanban methodology. Official website: https://kanboard.org/ List of features Chan

Kanboard 7k Jan 7, 2023
A high performance full-featured project management system

Interested in managed hosting? Take a brief survey to help us know what to build! Phproject A high-performance project management system in PHP Instal

Alan Hardman 357 Dec 27, 2022
Emoncms is an open-source web application for processing, logging and visualising energy, temperature and other environmental data and is part of the OpenEnergyMonitor project.

Emoncms is an open-source web application for processing, logging and visualising energy, temperature and other environmental data and is part of the OpenEnergyMonitor project.

Emoncms 1.1k Dec 22, 2022
Backend of the Articly wiki/cms project

Documentation | Changelog | Roadmap Currently under heavy development & testing. Fast, easy and reliable wiki software running in the web. What is Art

null 4 Feb 14, 2022
CRM project that I developed with ReactJS and Laravel 8.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Harun Doğdu 4 Nov 28, 2021
Server manager is a open source project made for people so that they can add the servers to one single place irrespective of their provider and manage it through one location.

Server Manager Are you sick of having to log into hundreads of different website just to access your server? Well we got you, Server manager is a open

null 8 Aug 9, 2022
This is a Task Manager system for managing your task. You can categorize your tasks and upload music to the project And a whole host of other features

taskManager Login and register Each user can have their own task Categorize tasks by creating folders Edit and Delete Folders Search for Tasks Show nu

masoudharooni 11 May 22, 2022
This is mini project for online test with Face Camera detection and Anti Cheating

Online Test Script With Face Detection + Anti Cheating This is mini project that you can use this to make your own online test. This project include F

Ferry Ariawan 3 Jun 5, 2022
Project of Simple Blog using: HTML, CSS, PHP, MYSQL, and BOOTSTRAP

Project-Stormwind Project of Simple Blog using: HTML, CSS, PHP, MYSQL, and BOOTSTRAP Functions : A personal blog about Blizzard and their work Main Th

Jan Andrzejewski 2 Aug 24, 2022
A simple blog project I built when learning Laravel 8

Harmonify Blog Disclaimer: All users data previewed on the image are fake data generated with FakerPHP. Introduction Harmonify Blog is a simple blog p

Wendy Surya Wijaya 3 Dec 9, 2021
Recreate Project Ecanteen

E-canteen Recreate Project Ecanteen,Project ini adalah pembuatan ulang dari Project E-canteen yang mana sebelumnya Pernah dibuat pada tahun 2020. Dika

Ananda Dwi 5 Jul 14, 2022
The objective of this Project is to generate Stock Management

Stock-Management The objective of this Project is to generate Stock Management Items / purchases, Sales Stock Client Provider Sales Management Purchas

Reda Ennakouri 7 Sep 18, 2022