2017 © Pedro Peláez
 

library notes

Easy Notes Management for Laravel 4.

image

albertgrala/notes

Easy Notes Management for Laravel 4.

  • Tuesday, February 26, 2013
  • by albertgrala
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Notes

Notes helps you manage your notes when developing an application, (*1)

By default the information is stored in a json file notes.json in the project root., (*2)

Installation

  • Update your composer.json to require "albertgrala/notes": "dev-master" .
{
  "require": {
    "laravel/framework": "4.0.*",
    "albertgrala/notes": "dev-master"
  },
  "autoload": {
    "classmap": [
      "app/commands",
      "app/controllers",
      "app/models",
      "app/database/migrations",
      "app/database/seeds",
      "app/tests/TestCase.php"
    ]
  },
  "minimum-stability": "dev"
}
  • Run composer update in the Terminal
  • Add the NotesServiceProvider 'Albertgrala\Notes\NotesServiceProvider' to the laravel providers array in the file app/config/app.php
'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    'Illuminate\Cache\CacheServiceProvider',
    'Illuminate\Foundation\Providers\CommandCreatorServiceProvider',
    'Illuminate\Session\CommandsServiceProvider',
    'Illuminate\Foundation\Providers\ComposerServiceProvider',
    'Illuminate\Routing\ControllerServiceProvider',
    'Illuminate\Cookie\CookieServiceProvider',
    'Illuminate\Database\DatabaseServiceProvider',
    'Illuminate\Encryption\EncryptionServiceProvider',
    'Illuminate\Filesystem\FilesystemServiceProvider',
    'Illuminate\Hashing\HashServiceProvider',
    'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider',
    'Illuminate\Log\LogServiceProvider',
    'Illuminate\Mail\MailServiceProvider',
    'Illuminate\Database\MigrationServiceProvider',
    'Illuminate\Pagination\PaginationServiceProvider',
    'Illuminate\Foundation\Providers\PublisherServiceProvider',
    'Illuminate\Queue\QueueServiceProvider',
    'Illuminate\Redis\RedisServiceProvider',
    'Illuminate\Auth\Reminders\ReminderServiceProvider',
    'Illuminate\Database\SeedServiceProvider',
    'Illuminate\Foundation\Providers\ServerServiceProvider',
    'Illuminate\Session\SessionServiceProvider',
    'Illuminate\Foundation\Providers\TinkerServiceProvider',
    'Illuminate\Translation\TranslationServiceProvider',
    'Illuminate\Validation\ValidationServiceProvider',
    'Illuminate\View\ViewServiceProvider',
    'Illuminate\Workbench\WorkbenchServiceProvider',
    'Albertgrala\Notes\NotesServiceProvider',

  )

Commands

You can see the notes commands typing php artisan in the Terminal, (*3)

Command Description Arguments Options
notes:add Add a new note to your notes file type
notes:complete Mark a note as done id
notes:delete Delete a note id all
notes:show LList the notes type all , done , today

notes:add

The argument type is required. Once entered the command, the terminal will ask you to describe your note, (*4)

php artisan notes:add todo

The note will be saved in the notes.json file. By default the type is converted to uppercase., (*5)

Examples of type : todo , optimize , fixme , bug, (*6)

notes:show

To list your notes is as easy as typing php artisan notes:show , this will prompt all notes marked as uncompleted., (*7)

php artisan notes:show

You can filter your notes by type passing the argument. Use either the singular or plural form, uppercase or lowercase., (*8)

php artisan notes:show todo
php artisan notes:show todos
php artisan notes:show TODO
php artisan notes:show TODOS

Flags

The --all flag will prompt the notes completed and uncompleted. In this example we will list all the bugs notes., (*9)

php artisan notes:show bugs --all

The --done flag will filter and prompt only the notes marked as completed., (*10)

php artisan notes:show todos --done

The --today flag will filter and prompt only the notes created today. In this example we will list all notes created today, (*11)

php artisan notes:show --today

You can combine flags to filter even more., (*12)

php artisan notes:show todos --done --today

notes:complete

Pass the note id to mark a note as completed. The note will be marked as done and the time saved as completed_at, (*13)

php artisan notes:complete 1

notes:delete

Pass the note id to delete a note, (*14)

php artisan notes:delete 5

You can delete all the notes passing the flag --all, (*15)

php artisan notes:delete --all

Json file

The notes.json has the following structure, (*16)

{
  "notes":[
    {
      "id":1,
      "name":"Create the readme file",
      "type":"TODO",
      "done":true,
      "created_at":"2013-02-26 13:41:37",
      "completed_at":"2013-02-26 13:41:52"
    },
    {
      "id":2,
      "name":"Push notes changes to github",
      "type":"TODO",
      "done":true,
      "created_at":"2013-02-26 13:44:38",
      "completed_at":"2013-02-26 13:44:53"
    }
  ]
}

Screenshot

alt text, (*17)

The Versions

26/02 2013

dev-master

9999999-dev

Easy Notes Management for Laravel 4.

  Sources   Download

The Requires

 

by Albert Gracia

26/02 2013

v0.11

0.11.0.0

Easy Notes Management for Laravel 4.

  Sources   Download

The Requires

 

by Albert Gracia