Download the PHP package icodestuff/laravel-notes without Composer

On this page you can find all versions of the php package icodestuff/laravel-notes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-notes

Packagist License Github Workflow Status Coverage Status Packagist Downloads

Laravel Notes is a flexible and easy-to-use package that adds a notes system to your Laravel application. It’s well-tested, highly configurable, and works seamlessly with multiple Laravel versions.


Features


Table of Contents

  1. Installation and Setup
  2. Configuration
  3. Usage
  4. Contribution Guidelines
  5. Security
  6. Credits

1. Installation and Setup

Installation via Composer

Install the package using Composer:

composer require icodestuff/laravel-notes

Setup for Laravel

Note: This package will automatically register itself for Laravel >= 5.5.

For earlier versions, manually register the service provider in config/app.php:

'providers' => [
    // Other service providers...
    Icodestuff\LaravelNotes\LaravelNotesServiceProvider::class,
],

Publish the configuration file:

php artisan vendor:publish --provider="Icodestuff\LaravelNotes\LaravelNotesServiceProvider"

2. Configuration

Customize the package by editing config/notes.php:

return [
    'database' => [
        'connection' => env('DB_CONNECTION', 'mysql'),
        'prefix'     => null,
    ],
    'authors' => [
        'table' => 'users',
        'model' => App\User::class,
    ],
    'notes' => [
        'table' => 'notes',
        'model' => Icodestuff\LaravelNotes\Models\Note::class,
    ],
];

3. Usage

Adding Notes to Models

Use the HasManyNotes trait in your model:

use Icodestuff\LaravelNotes\Traits\HasManyNotes;

class Post extends Model {
    use HasManyNotes;
}

Add a note:

$post = App\Post::first();
$note = $post->createNote('This is a note!');

Add a note with an author:

$user = App\User::first();
$note = $post->createNote('Note with author', $user);

Retrieve notes:

$notes = $post->notes;

Using the HasOneNote Trait

For managing a single note on a model, use the HasOneNote trait:

use Icodestuff\LaravelNotes\Traits\HasOneNote;

class Post extends Model {
    use HasOneNote;
}

Access the note:

$note = $post->note;

Retrieve Author's Notes

Add the AuthoredNotes trait to your User model to retrieve all notes authored by a user:

use Icodestuff\LaravelNotes\Traits\AuthoredNotes;

class User extends Model {
    use AuthoredNotes;
}

Retrieve the author's notes:

$user = App\User::first();
$notes = $user->authoredNotes;

Find a Specific Note by ID

To find a note by its ID:

$post = App\Post::first();
$note = $post->findNote(1);

Note: The findNote method is only available in the HasManyNotes trait.


Contribution

Feel free to submit any issues or pull requests! Please read the contribution guidelines first.


Security

If you discover any security issues, please email [email protected] instead of using the issue tracker.


Credits


All versions of laravel-notes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
arcanedev/support Version ^10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package icodestuff/laravel-notes contains the following files

Loading the files please wait ....