Giter VIP home page Giter VIP logo

laravel-uuid's Introduction

Laravel UUID

This package is a fork of nevadskiy/laravel-uuid.

Latest Stable Version Tests Code Coverage License

The package provides UUID keys functionality for Eloquent models with one single trait.

More about using UUID as primary keys.

Usage

Add a trait to your model, and it will automatically set the UUID during model creation.

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Nevadskiy\Uuid\Uuid;

class Book extends Model
{
    use Uuid;
}

Update your migrations to specify UUID type for a primary key.

Schema::create('books', function (Blueprint $table) {
    $table->uuid('id')->primary();
});

Installation

Install a package via composer.

composer require imcity-tech/laravel-uuid

Requirements

  • Laravel 9.0 or newer
  • PHP 8.0 or newer

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Any contribution is Welcome.

Please see CONTRIBUTING for more information.

Security

If you discover any security related issues, please e-mail me instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

laravel-uuid's People

Contributors

nevadskiy avatar imclement avatar sviatoslavbereznitskyi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.